1
00:00:04,600 --> 00:00:12,820
In this lesson we will talk about the modifications introduced by the long chain V010 version.

2
00:00:15,390 --> 00:00:21,120
As always, you will find more detailed information in the attached materials, in this case with a

3
00:00:21,120 --> 00:00:25,980
notebook with text and code about the new long chain version.

4
00:00:27,920 --> 00:00:33,560
Remember that we have been talking about the changing environment around the LLM applications.

5
00:00:34,250 --> 00:00:38,690
These have this has advantages and disadvantages.

6
00:00:39,440 --> 00:00:48,890
The advantages are that if you keep updated, you will be among the few that master a this new field.

7
00:00:48,890 --> 00:00:58,010
And the disadvantages is that, uh, if you uh, if you lose track of the changes, you will be immediately

8
00:00:58,010 --> 00:01:06,590
behind the a elite of professionals that master this new field.

9
00:01:07,670 --> 00:01:09,290
So remember what we said.

10
00:01:09,290 --> 00:01:16,250
The environment around LM applications is very, very new and is changing one year from now.

11
00:01:16,250 --> 00:01:24,530
It can be very different from today and you must get used to a change in your profession.

12
00:01:24,530 --> 00:01:29,600
Remember that especially frameworks like Long Chain are evolving.

13
00:01:29,600 --> 00:01:34,070
Remember that we have been talking about the first and second version of Long Chain.

14
00:01:34,070 --> 00:01:43,430
So this, uh, version 010 is like the third version of Long Chain.

15
00:01:43,430 --> 00:01:50,600
We will talk a little bit more about that, and you will see that they seem to be leaning towards the

16
00:01:50,600 --> 00:01:53,960
long chain extension expression language.

17
00:01:53,960 --> 00:01:55,580
So the second version.

18
00:01:55,580 --> 00:01:58,490
But we will talk about that later.

19
00:01:59,400 --> 00:02:13,050
So this is version 010A was released uh, in the mid of January 2024, and the launching team said that

20
00:02:13,050 --> 00:02:18,600
the main purpose was, uh, you know, to have a more stable version.

21
00:02:18,600 --> 00:02:28,860
Um, but our, uh, personal impression is that the main goal of this version is to facilitate a long

22
00:02:28,860 --> 00:02:29,940
chain updates.

23
00:02:29,940 --> 00:02:38,130
So the previous updates, uh, in long chain has been had been a little bit problematic.

24
00:02:38,130 --> 00:02:49,320
So our, uh, feeling is that this a new version and the changes that it introduces are, uh, preparing

25
00:02:49,320 --> 00:03:01,710
the way of the future for new updates and, uh, changes in the framework in a more professional manner.

26
00:03:01,980 --> 00:03:07,890
Uh, it they say that this new version should not affect apps.

27
00:03:07,950 --> 00:03:17,880
Uh, but what we see is that it is probably not affect apps in production that keep a very, uh, careful

28
00:03:17,880 --> 00:03:21,750
track of the versions of every package they are using.

29
00:03:21,750 --> 00:03:28,740
But probably it will affect most demos, because when when you are preparing a demo, usually you are

30
00:03:28,740 --> 00:03:36,240
less careful about the details, like, uh, for example, every package, a version.

31
00:03:38,620 --> 00:03:48,100
So the main change of this new version is that the the previous Lang chain package is now divided in

32
00:03:48,100 --> 00:03:50,200
several different packages.

33
00:03:50,230 --> 00:03:56,890
They say they do this because it is going to make it easier for them to update every package.

34
00:03:56,890 --> 00:04:06,550
So right now we have a several different packages and the main ones are Lang Chain core and Lang chain

35
00:04:06,970 --> 00:04:09,040
community and chain.

36
00:04:09,040 --> 00:04:16,570
Core is for launching functionality and launching and launching communities for launching integrations.

37
00:04:16,570 --> 00:04:23,440
But keep in mind that some special integrations like, for example, OpenAI, have.

38
00:04:24,530 --> 00:04:26,240
A special partner.

39
00:04:26,240 --> 00:04:27,170
Packages.

40
00:04:30,620 --> 00:04:36,410
So these changes are going to affect in several areas.

41
00:04:36,410 --> 00:04:37,850
The first one is the.

42
00:04:38,820 --> 00:04:45,900
The area where we import the packages we need in a, in a in a program before.

43
00:04:45,900 --> 00:04:54,690
For example, if we were importing OpenAI, as you know, we would write from land change LMS import

44
00:04:54,690 --> 00:05:03,150
OpenAI right now with this new land change OpenAI package, we are importing OpenAI, as you see in

45
00:05:03,150 --> 00:05:04,920
the screen from land change.

46
00:05:04,950 --> 00:05:07,740
OpenAI import OpenAI.

47
00:05:09,210 --> 00:05:19,530
This has also effects in the way we import packages, or we install packages in terminal for example.

48
00:05:19,530 --> 00:05:28,290
So if you remember in the previous versions of Long chain, when we started a project, if we have a

49
00:05:28,290 --> 00:05:36,180
new a virtual environment and we we need to install the packages from from scratch, we would install

50
00:05:36,180 --> 00:05:38,430
long chain as a whole package.

51
00:05:38,430 --> 00:05:43,680
And we will write in the in the terminal pip install long chain.

52
00:05:44,130 --> 00:05:47,940
Or if we were in the in the notebook we will wait.

53
00:05:47,940 --> 00:05:52,290
We will write exclamation mark pip install long chain.

54
00:05:52,290 --> 00:06:02,070
When we write exclamation mark pip in in the in the notebook, we are giving the notebook an instruction

55
00:06:02,070 --> 00:06:06,450
in order to execute a command like in terminal, right?

56
00:06:06,450 --> 00:06:14,340
So writing exclamation mark pip install long chain in a notebook is exactly the same.

57
00:06:14,340 --> 00:06:18,750
Like if you write pip install long chain in your terminal.

58
00:06:19,350 --> 00:06:29,520
By the way, if you are a reading one of the notebooks, a of the exercises we provide, and you find

59
00:06:29,520 --> 00:06:39,540
a pound sign before exclamation mark pip, install this pound sign as probably many of you know, mean

60
00:06:39,660 --> 00:06:42,420
means a comment out.

61
00:06:43,240 --> 00:06:53,500
Commenting out a sentence in a in a computer, in a software program, a means that a the computer is

62
00:06:53,500 --> 00:06:56,860
not going to read what it is in that line.

63
00:06:56,860 --> 00:07:06,370
So when we use pound sign in the notebooks we are trying to avoid to install again one package that

64
00:07:06,370 --> 00:07:08,170
we have already installed.

65
00:07:08,170 --> 00:07:16,600
So when we write the the notebook and the initial line is exclamation mark, pip, install, whatever.

66
00:07:16,600 --> 00:07:26,170
But when we save this notebook, we write a pound sign before the exclamation mark pip install because

67
00:07:26,170 --> 00:07:34,180
we don't want to reinstall the package again whenever we open the notebook is is is not necessary and

68
00:07:34,180 --> 00:07:35,740
it's just a waste of time.

69
00:07:35,740 --> 00:07:39,340
So that's that's the reason why you would see the pound sign.

70
00:07:39,340 --> 00:07:48,370
So if it is the first time for you installing this, uh, whatever, whatever module it is, just remove

71
00:07:48,370 --> 00:07:55,210
the pound sign and execute the cell with exclamation mark pip install whatever.

72
00:07:55,240 --> 00:07:55,780
Okay.

73
00:07:55,780 --> 00:07:59,890
And then if you want, you can, uh, write the pound sign again.

74
00:07:59,890 --> 00:08:02,200
So it is commented out.

75
00:08:02,890 --> 00:08:13,000
So in, in this area of installing modules in terminal or in notebook, you would say that this changes

76
00:08:13,000 --> 00:08:17,530
in the version 010 of land chain means.

77
00:08:17,530 --> 00:08:26,410
That means that, uh, we now will have to install new packages like long chain OpenAI and long chain

78
00:08:26,410 --> 00:08:34,659
Community and pay attention, because when we install the package, the hyphen here is different from

79
00:08:34,659 --> 00:08:43,179
the hyphen we are going to use when we are importing inside the, uh, Python program.

80
00:08:43,179 --> 00:08:43,570
Okay.

81
00:08:43,570 --> 00:08:46,060
So just keep this in mind.

82
00:08:46,900 --> 00:08:56,440
Another, uh, effect of this change of the 010 version of long chain is what we call the deprecated

83
00:08:56,440 --> 00:08:57,430
warning.

84
00:08:57,700 --> 00:09:07,330
So a although the classic version of Long Chain keeps working in most cases, like 99% of the cases.

85
00:09:08,090 --> 00:09:17,840
Sometimes, and I would say a bit often we are going to receive warnings saying that some elements of

86
00:09:17,840 --> 00:09:21,470
our classic land chain will be deprecated.

87
00:09:21,470 --> 00:09:28,580
Not now, not now, not in the version 010, but in the next version.

88
00:09:28,580 --> 00:09:37,250
Okay, so this is just a like a reminder of a long chain saying as that some elements like for example

89
00:09:37,250 --> 00:09:41,480
the dot run element are going to be deprecated.

90
00:09:41,480 --> 00:09:48,800
They will be replaced by new ones like for example, invoke in this case in the next version of long

91
00:09:48,800 --> 00:09:49,100
chain.

92
00:09:49,870 --> 00:09:53,590
When will we have the next version of Land Chain?

93
00:09:53,620 --> 00:10:00,580
We don't know, but we suspect that it is not going to be soon.

94
00:10:00,580 --> 00:10:11,230
So usually before you reach the version 020, you are going to reach the 011, then the zero, one two,

95
00:10:11,230 --> 00:10:13,150
etc. etc. but let's see.

96
00:10:13,180 --> 00:10:20,440
Long chain is very young and we don't know what are going to be the the patterns they follow.

97
00:10:21,240 --> 00:10:28,230
So this warning here deprecated that you are going to see in some of the exercises that we provide.

98
00:10:28,230 --> 00:10:29,820
It doesn't mean anything.

99
00:10:29,820 --> 00:10:31,230
The exercise works.

100
00:10:31,230 --> 00:10:37,890
It is only telling you that the classic version we are using is not going to be.

101
00:10:38,700 --> 00:10:46,710
The the preferred one in the next version, but right now works perfectly fine.

102
00:10:47,130 --> 00:10:57,690
So as a consequence of this change, that, as I am telling you, occur on January 2024, we had to

103
00:10:57,690 --> 00:10:59,970
include some changes in our program.

104
00:10:59,970 --> 00:11:05,520
So all our exercises and demos were, uh, already prepared.

105
00:11:05,790 --> 00:11:13,830
And we have review all of them in order to confirm that they are working properly.

106
00:11:14,430 --> 00:11:22,440
And what we have seen is that we needed to include some changes in almost 100% of them.

107
00:11:22,440 --> 00:11:30,480
So you will see that even when in the explanatory videos that we provide with the exercises.

108
00:11:30,480 --> 00:11:38,100
You see, for example, that when you import OpenAI, OpenAI, uh, we use the classic way like from

109
00:11:38,100 --> 00:11:45,510
lunch change LMS, uh, in import OpenAI in the attach notebook.

110
00:11:45,510 --> 00:11:48,600
We have corrected that way.

111
00:11:48,600 --> 00:11:54,630
And you will find now from on chain OpenAI import OpenAI.

112
00:11:54,660 --> 00:11:55,050
Right.

113
00:11:55,050 --> 00:11:59,580
So you will see you will see you will see minor changes like that.

114
00:11:59,580 --> 00:12:03,870
And we have done that in order to avoid that.

115
00:12:03,870 --> 00:12:10,830
The notebooks, when you execute the notebooks in your computer a work properly.

116
00:12:10,830 --> 00:12:11,430
Right.

117
00:12:11,430 --> 00:12:13,110
So just keep that in mind.

118
00:12:13,110 --> 00:12:20,580
So the notebooks of the basic launching block, the notebooks of the launching expression language,

119
00:12:20,580 --> 00:12:27,090
block the notebooks of the A level up level one apps block.

120
00:12:27,120 --> 00:12:36,600
And also the code associated with the level two apps and level three apps has all of the all of them

121
00:12:36,600 --> 00:12:41,730
have been a updated in order to introduce these changes.

122
00:12:41,730 --> 00:12:50,940
So basically we have we have changed the way we import some of the modules and also the way we install

123
00:12:50,940 --> 00:12:54,480
some of the some of the packages from the notebooks mostly.

124
00:12:54,480 --> 00:12:54,990
Okay.

125
00:12:54,990 --> 00:12:59,040
So just keep that in mind in the documentation.

126
00:12:59,040 --> 00:13:07,290
In the attached documentation you are going to find a notebook with a the main line chain.

127
00:13:07,590 --> 00:13:11,730
Uh 010 version changes.

128
00:13:11,730 --> 00:13:18,420
We are based this notebook in the Quick Start guide provided by launch.

129
00:13:19,140 --> 00:13:25,140
In this notebook, we are including a couple of, uh, sources from Long Chain.

130
00:13:25,140 --> 00:13:31,200
One is the blog post they provided when they launch this new version of Long Chain.

131
00:13:31,200 --> 00:13:38,400
And the other is a video from the CEO of Long Chain explaining why the changes and, you know, giving

132
00:13:38,400 --> 00:13:40,020
some details about them.

133
00:13:42,060 --> 00:13:53,310
So in this lesson, we have been talking about the modifications that the version 010 of Long Chain

134
00:13:53,310 --> 00:14:04,530
has introduced and how we have applied these modifications in our, uh, in our exercises.

