Okay.
So here you have a demo of the application we are going to build in this lesson.
A as you can see this is a full stack application.
And that A uses ChatGPT.
So the important thing uh, for this project is that, that you see how to open the door to orchestration
frameworks and LMS in your full stack application.
This is the most important thing we want you to take from this lesson.
So the functionality here is very, very simple.
We are using the a basic application.
We created a at the beginning of this blog.
The the you know the to do the to do a crud we created.
And we have added one functionality that makes use of a orchestration orchestration frameworks in this
case is long chain and a one lm model in this case is ChatGPT from OpenAI.
So the functionality we have added is that once we enter a new task, we will be able to click here
in this button, and this button will generate a poem.
A based on the task we are entering.
Okay.
So for example, if we enter here lunch is our next two thing.
This task is created.
And now if we click on this button.
The application is going to generate a poem or something like a poem, you know about that.
So this is just a way to show, to demonstrate that this application is right now making use of orchestration
frameworks and LMS.
So the important thing, as I was saying, the important thing of this exercise is for you to learn
how to integrate orchestration frameworks and LMS in your full stack applications.
Once you learn that this is how to open the door after learning how to open the door, you can do every
kind of things, as we will see in the next project with with a rack.
Uh, exercise.
Okay.
And now let's see the changes in the code and the changes in the, in the basic application we will
need to do so.
Let's see that in the.
Well, we can stay in this in this same video.
So let's go.
Let's go to the slides.
And here you have the A.
The notebook.
As always, the notebook is the document with more accurate and and detailed information for you.
Okay, so let's take a look at the notes in the in the slides.
So what you are, uh, you remember what we are going to do is a is a is we are going to reproduce the
basic application we created in the first lesson of this blog, the to do application.
And a we are going to, uh, integrate an orchestration framework long chain in this case and an LLM,
a foundation, LLM in this case ChatGPT from OpenAI.
So our recommendation is that you make a copy of the todo app on your computer so as not to write over
the original todo app.
This is when you start practicing by yourself.
The first thing, as always, that we recommend is that you download the code from GitHub.
You play around with it and then you try to reproduce it.
You know as many times as you need in order to feel comfortable with the with the exercise.
So you will see that we are going to make a few changes to the basic application.
And here you have the changes in detail.
The first thing is that A you need to add the OpenAI key in the a dot m file of the back end.
Okay.
The back end, remember.
And when you do this a as, as we said in the previous lesson, you will have to remind not to share
this dot m file with anyone.
So remember to configure the git ignore file dot.
Gitignore file properly.
In order to avoid that this dot m file goes to your GitHub repository.
Okay.
Because we you don't want to share your OpenAI key.
The second thing, and that you will need to do is to add imports in the A to DOS router.
So in the back end slash routers slash to DOS dot pi you are going to include imports here.
Remember is where you are going to include the imports according to the modifications of the version
010 that you already know from long chain.
So remember that instead of doing from long chain import open AI, you will have to do from long chain
a hyphen OpenAI import OpenAI.
You remember that, right?
So please review the video.
We have included the video several times.
Uh, I'm going to include the video also after this one or before this one for you to have that a close
to this, uh, chapter.
So remember that the imports are going to be a little bit different in your case, why this is working
for us?
Because we have this app included in a virtual environment that is configured with a, with an old version
of long chain.
Why?
Because we we did this.
We built this before the, the the version 010.
But the changes you will have to do are very simple okay?
So don't worry about it.
Just remember what you have already learned.
And in case of doubt, you know where to find answers.
So we are going to import OpenAI uh prompt template and also LM chain.
We are going to do, as you know, a very simple, uh, thing with uh, long chain and OpenAI in this
application.
So a uh, first import, then we are going to add a basic long chain code.
Okay.
So in the same file in the back end routers todos.py you can include this code in order to check this
very simple functionality okay.
This is where you are going to try the functionality that you added here.
And in order to check uh that this is working, you can start the back end server in your terminal and
check how this works.
Okay.
And now this is a very simple long chain.
Excuse me.
Very simple launching functionality.
And after that you are going to include the a little bit more advanced functionality that we have in
the demo, which is the the one that writes a poem a after the task included.
Okay.
So this is the functionality you will have to add in the back end routers to do dot pi.
And in the front end you will have to make a few small changes.
Remember that we are including the new button there and the functionality associated with it.
So the you have some changes in the to do component.
Here you have the changes for you to review and and include it.
And once you have that in your front end, you are ready to you already know how to a how to start the
full stack application in your computer.
And if you wish, you also know how to deploy this application into render and Cellcom.
Just follow the same the same procedure.
Okay, so now we have seen one step further.
We started this blog with a simple level three application.
Then we went a little bit farther with a medium level three application.
And now we have a basic level three LM application.
We have integrated orchestration frameworks and also an LM.
So in the next lesson.
We are going to go one step further and we are going to use the medium app we created, the one that
is a loading PDF files in S3 in Amazon S3, and then we are going to use to include the lag functionality
into that app.
Okay.
So we will we are going to do that in the next video.