In this lesson we will talk about the modifications introduced by the long chain V010 version.
As always, you will find more detailed information in the attached materials, in this case with a
notebook with text and code about the new long chain version.
Remember that we have been talking about the changing environment around the LLM applications.
These have this has advantages and disadvantages.
The advantages are that if you keep updated, you will be among the few that master a this new field.
And the disadvantages is that, uh, if you uh, if you lose track of the changes, you will be immediately
behind the a elite of professionals that master this new field.
So remember what we said.
The environment around LM applications is very, very new and is changing one year from now.
It can be very different from today and you must get used to a change in your profession.
Remember that especially frameworks like Long Chain are evolving.
Remember that we have been talking about the first and second version of Long Chain.
So this, uh, version 010 is like the third version of Long Chain.
We will talk a little bit more about that, and you will see that they seem to be leaning towards the
long chain extension expression language.
So the second version.
But we will talk about that later.
So this is version 010A was released uh, in the mid of January 2024, and the launching team said that
the main purpose was, uh, you know, to have a more stable version.
Um, but our, uh, personal impression is that the main goal of this version is to facilitate a long
chain updates.
So the previous updates, uh, in long chain has been had been a little bit problematic.
So our, uh, feeling is that this a new version and the changes that it introduces are, uh, preparing
the way of the future for new updates and, uh, changes in the framework in a more professional manner.
Uh, it they say that this new version should not affect apps.
Uh, but what we see is that it is probably not affect apps in production that keep a very, uh, careful
track of the versions of every package they are using.
But probably it will affect most demos, because when when you are preparing a demo, usually you are
less careful about the details, like, uh, for example, every package, a version.
So the main change of this new version is that the the previous Lang chain package is now divided in
several different packages.
They say they do this because it is going to make it easier for them to update every package.
So right now we have a several different packages and the main ones are Lang Chain core and Lang chain
community and chain.
Core is for launching functionality and launching and launching communities for launching integrations.
But keep in mind that some special integrations like, for example, OpenAI, have.
A special partner.
Packages.
So these changes are going to affect in several areas.
The first one is the.
The area where we import the packages we need in a, in a in a program before.
For example, if we were importing OpenAI, as you know, we would write from land change LMS import
OpenAI right now with this new land change OpenAI package, we are importing OpenAI, as you see in
the screen from land change.
OpenAI import OpenAI.
This has also effects in the way we import packages, or we install packages in terminal for example.
So if you remember in the previous versions of Long chain, when we started a project, if we have a
new a virtual environment and we we need to install the packages from from scratch, we would install
long chain as a whole package.
And we will write in the in the terminal pip install long chain.
Or if we were in the in the notebook we will wait.
We will write exclamation mark pip install long chain.
When we write exclamation mark pip in in the in the notebook, we are giving the notebook an instruction
in order to execute a command like in terminal, right?
So writing exclamation mark pip install long chain in a notebook is exactly the same.
Like if you write pip install long chain in your terminal.
By the way, if you are a reading one of the notebooks, a of the exercises we provide, and you find
a pound sign before exclamation mark pip, install this pound sign as probably many of you know, mean
means a comment out.
Commenting out a sentence in a in a computer, in a software program, a means that a the computer is
not going to read what it is in that line.
So when we use pound sign in the notebooks we are trying to avoid to install again one package that
we have already installed.
So when we write the the notebook and the initial line is exclamation mark, pip, install, whatever.
But when we save this notebook, we write a pound sign before the exclamation mark pip install because
we don't want to reinstall the package again whenever we open the notebook is is is not necessary and
it's just a waste of time.
So that's that's the reason why you would see the pound sign.
So if it is the first time for you installing this, uh, whatever, whatever module it is, just remove
the pound sign and execute the cell with exclamation mark pip install whatever.
Okay.
And then if you want, you can, uh, write the pound sign again.
So it is commented out.
So in, in this area of installing modules in terminal or in notebook, you would say that this changes
in the version 010 of land chain means.
That means that, uh, we now will have to install new packages like long chain OpenAI and long chain
Community and pay attention, because when we install the package, the hyphen here is different from
the hyphen we are going to use when we are importing inside the, uh, Python program.
Okay.
So just keep this in mind.
Another, uh, effect of this change of the 010 version of long chain is what we call the deprecated
warning.
So a although the classic version of Long Chain keeps working in most cases, like 99% of the cases.
Sometimes, and I would say a bit often we are going to receive warnings saying that some elements of
our classic land chain will be deprecated.
Not now, not now, not in the version 010, but in the next version.
Okay, so this is just a like a reminder of a long chain saying as that some elements like for example
the dot run element are going to be deprecated.
They will be replaced by new ones like for example, invoke in this case in the next version of long
chain.
When will we have the next version of Land Chain?
We don't know, but we suspect that it is not going to be soon.
So usually before you reach the version 020, you are going to reach the 011, then the zero, one two,
etc. etc. but let's see.
Long chain is very young and we don't know what are going to be the the patterns they follow.
So this warning here deprecated that you are going to see in some of the exercises that we provide.
It doesn't mean anything.
The exercise works.
It is only telling you that the classic version we are using is not going to be.
The the preferred one in the next version, but right now works perfectly fine.
So as a consequence of this change, that, as I am telling you, occur on January 2024, we had to
include some changes in our program.
So all our exercises and demos were, uh, already prepared.
And we have review all of them in order to confirm that they are working properly.
And what we have seen is that we needed to include some changes in almost 100% of them.
So you will see that even when in the explanatory videos that we provide with the exercises.
You see, for example, that when you import OpenAI, OpenAI, uh, we use the classic way like from
lunch change LMS, uh, in import OpenAI in the attach notebook.
We have corrected that way.
And you will find now from on chain OpenAI import OpenAI.
Right.
So you will see you will see you will see minor changes like that.
And we have done that in order to avoid that.
The notebooks, when you execute the notebooks in your computer a work properly.
Right.
So just keep that in mind.
So the notebooks of the basic launching block, the notebooks of the launching expression language,
block the notebooks of the A level up level one apps block.
And also the code associated with the level two apps and level three apps has all of the all of them
have been a updated in order to introduce these changes.
So basically we have we have changed the way we import some of the modules and also the way we install
some of the some of the packages from the notebooks mostly.
Okay.
So just keep that in mind in the documentation.
In the attached documentation you are going to find a notebook with a the main line chain.
Uh 010 version changes.
We are based this notebook in the Quick Start guide provided by launch.
In this notebook, we are including a couple of, uh, sources from Long Chain.
One is the blog post they provided when they launch this new version of Long Chain.
And the other is a video from the CEO of Long Chain explaining why the changes and, you know, giving
some details about them.
So in this lesson, we have been talking about the modifications that the version 010 of Long Chain
has introduced and how we have applied these modifications in our, uh, in our exercises.