1
00:00:04,000 --> 00:00:12,460
In this chapter, we are going to see how to create change with the new language.

2
00:00:12,460 --> 00:00:17,980
That long chain is promoting the long chain expression language.

3
00:00:18,580 --> 00:00:25,600
As you know, right now, we can use both ways the classic way and the new way.

4
00:00:25,990 --> 00:00:32,890
In the future, it seems that launching is going to promote the new way, the language expression and

5
00:00:32,890 --> 00:00:35,200
the expression language.

6
00:00:35,380 --> 00:00:43,480
But right now you can use both a the goal behind the creation of the long chain expression language.

7
00:00:43,480 --> 00:00:53,170
This new way is to simplify the use of long chain, and have it more easy to integrate with other applications

8
00:00:53,170 --> 00:00:55,420
like Langschmidt, for example.

9
00:00:55,420 --> 00:01:00,100
In my opinion, the first of these goals is not very well achieved.

10
00:01:00,100 --> 00:01:06,700
So in my opinion, the long chain expression language is not more simple than the classic way.

11
00:01:06,700 --> 00:01:08,950
But this is just my opinion.

12
00:01:08,950 --> 00:01:14,890
So what we are going to do is we are going to see, we are going to compare the both way, the the both

13
00:01:14,890 --> 00:01:19,750
ways, the classic and the new for you to be able to start experimenting with it.

14
00:01:19,750 --> 00:01:26,350
So in this chapter we are going to, uh, create a chain with the classic way and with the new way.

15
00:01:26,440 --> 00:01:30,550
So you are very familiar with the classic way already.

16
00:01:30,550 --> 00:01:37,450
We initially, uh, connect with the temp file, then we communicate with the OpenAI API.

17
00:01:37,930 --> 00:01:42,640
And to create a chain in the classic way is very easy.

18
00:01:42,640 --> 00:01:45,370
We import the LM module.

19
00:01:45,370 --> 00:01:51,670
Then we have a language model, we have a prompt template, and we create a chain very easy the chain

20
00:01:51,670 --> 00:01:57,400
with the LM module module we include the language model and the prompt template.

21
00:01:57,400 --> 00:02:02,980
And then we include the user input when we execute the chain.

22
00:02:03,250 --> 00:02:06,400
Remember here we are using the dot predict.

23
00:02:06,730 --> 00:02:09,430
And then we enter the user input this way.

24
00:02:09,430 --> 00:02:18,010
So the same operations with the new language is a is achieved with this expression here.

25
00:02:18,010 --> 00:02:26,770
So this a chain equals long chain is achieved with this new expression here.

26
00:02:26,770 --> 00:02:31,720
The newest thing is this uh is this element called pipe.

27
00:02:31,720 --> 00:02:36,250
So you will read this prompt pipe LM okay.

28
00:02:36,250 --> 00:02:44,440
So the second difference is that instead of using predict right now we are using dot invoke.

29
00:02:44,440 --> 00:02:52,570
And the third change is that instead of using the enter in the user input this way variable equals and

30
00:02:52,570 --> 00:02:54,790
then the input.

31
00:02:54,790 --> 00:02:58,210
We are right now using a Python dictionary.

32
00:02:58,210 --> 00:03:04,420
So you will use the A variable as a dictionary.

33
00:03:04,600 --> 00:03:05,800
A element.

34
00:03:05,800 --> 00:03:08,980
And then you will use the user input.

35
00:03:08,980 --> 00:03:10,990
So that's it.

36
00:03:10,990 --> 00:03:19,630
Uh for a very simple chain the classic way and the new long chain expression language way.

37
00:03:21,790 --> 00:03:29,020
As you know, more information in the long chain documentation where you can find many more details

38
00:03:29,020 --> 00:03:34,570
about the new way of creating a change in the new language.

