1
00:00:03,630 --> 00:00:04,110
Okay.

2
00:00:04,110 --> 00:00:10,860
So here you have a demo of the application we are going to build in this lesson.

3
00:00:11,100 --> 00:00:17,100
A as you can see this is a full stack application.

4
00:00:17,130 --> 00:00:21,090
And that A uses ChatGPT.

5
00:00:21,780 --> 00:00:31,380
So the important thing uh, for this project is that, that you see how to open the door to orchestration

6
00:00:31,380 --> 00:00:35,580
frameworks and LMS in your full stack application.

7
00:00:35,580 --> 00:00:39,570
This is the most important thing we want you to take from this lesson.

8
00:00:39,570 --> 00:00:42,510
So the functionality here is very, very simple.

9
00:00:42,510 --> 00:00:46,920
We are using the a basic application.

10
00:00:46,920 --> 00:00:49,770
We created a at the beginning of this blog.

11
00:00:49,770 --> 00:00:55,470
The the you know the to do the to do a crud we created.

12
00:00:55,470 --> 00:01:02,970
And we have added one functionality that makes use of a orchestration orchestration frameworks in this

13
00:01:02,970 --> 00:01:09,600
case is long chain and a one lm model in this case is ChatGPT from OpenAI.

14
00:01:09,930 --> 00:01:17,100
So the functionality we have added is that once we enter a new task, we will be able to click here

15
00:01:17,100 --> 00:01:21,360
in this button, and this button will generate a poem.

16
00:01:22,420 --> 00:01:27,010
A based on the task we are entering.

17
00:01:27,010 --> 00:01:27,580
Okay.

18
00:01:27,580 --> 00:01:34,420
So for example, if we enter here lunch is our next two thing.

19
00:01:34,930 --> 00:01:36,910
This task is created.

20
00:01:36,910 --> 00:01:39,400
And now if we click on this button.

21
00:01:40,360 --> 00:01:49,330
The application is going to generate a poem or something like a poem, you know about that.

22
00:01:49,330 --> 00:01:57,370
So this is just a way to show, to demonstrate that this application is right now making use of orchestration

23
00:01:57,370 --> 00:01:59,440
frameworks and LMS.

24
00:01:59,440 --> 00:02:06,310
So the important thing, as I was saying, the important thing of this exercise is for you to learn

25
00:02:06,310 --> 00:02:12,550
how to integrate orchestration frameworks and LMS in your full stack applications.

26
00:02:12,550 --> 00:02:18,430
Once you learn that this is how to open the door after learning how to open the door, you can do every

27
00:02:18,430 --> 00:02:22,780
kind of things, as we will see in the next project with with a rack.

28
00:02:22,780 --> 00:02:24,100
Uh, exercise.

29
00:02:24,100 --> 00:02:24,610
Okay.

30
00:02:24,610 --> 00:02:31,360
And now let's see the changes in the code and the changes in the, in the basic application we will

31
00:02:31,360 --> 00:02:32,620
need to do so.

32
00:02:32,620 --> 00:02:35,020
Let's see that in the.

33
00:02:35,810 --> 00:02:38,780
Well, we can stay in this in this same video.

34
00:02:38,780 --> 00:02:39,830
So let's go.

35
00:02:39,830 --> 00:02:42,020
Let's go to the slides.

36
00:02:42,020 --> 00:02:45,650
And here you have the A.

37
00:02:46,580 --> 00:02:47,750
The notebook.

38
00:02:47,750 --> 00:02:54,890
As always, the notebook is the document with more accurate and and detailed information for you.

39
00:02:54,890 --> 00:03:00,980
Okay, so let's take a look at the notes in the in the slides.

40
00:03:00,980 --> 00:03:08,660
So what you are, uh, you remember what we are going to do is a is a is we are going to reproduce the

41
00:03:08,660 --> 00:03:14,120
basic application we created in the first lesson of this blog, the to do application.

42
00:03:14,510 --> 00:03:22,670
And a we are going to, uh, integrate an orchestration framework long chain in this case and an LLM,

43
00:03:22,670 --> 00:03:26,750
a foundation, LLM in this case ChatGPT from OpenAI.

44
00:03:28,120 --> 00:03:36,400
So our recommendation is that you make a copy of the todo app on your computer so as not to write over

45
00:03:36,400 --> 00:03:37,930
the original todo app.

46
00:03:37,960 --> 00:03:42,010
This is when you start practicing by yourself.

47
00:03:42,010 --> 00:03:47,650
The first thing, as always, that we recommend is that you download the code from GitHub.

48
00:03:47,650 --> 00:03:50,890
You play around with it and then you try to reproduce it.

49
00:03:50,890 --> 00:03:56,620
You know as many times as you need in order to feel comfortable with the with the exercise.

50
00:03:56,620 --> 00:04:05,290
So you will see that we are going to make a few changes to the basic application.

51
00:04:05,710 --> 00:04:08,260
And here you have the changes in detail.

52
00:04:08,710 --> 00:04:19,060
The first thing is that A you need to add the OpenAI key in the a dot m file of the back end.

53
00:04:19,060 --> 00:04:19,420
Okay.

54
00:04:19,420 --> 00:04:20,860
The back end, remember.

55
00:04:21,670 --> 00:04:31,330
And when you do this a as, as we said in the previous lesson, you will have to remind not to share

56
00:04:31,330 --> 00:04:33,580
this dot m file with anyone.

57
00:04:33,580 --> 00:04:38,350
So remember to configure the git ignore file dot.

58
00:04:38,350 --> 00:04:40,420
Gitignore file properly.

59
00:04:40,420 --> 00:04:45,040
In order to avoid that this dot m file goes to your GitHub repository.

60
00:04:45,040 --> 00:04:45,760
Okay.

61
00:04:45,880 --> 00:04:50,140
Because we you don't want to share your OpenAI key.

62
00:04:51,090 --> 00:04:59,220
The second thing, and that you will need to do is to add imports in the A to DOS router.

63
00:04:59,220 --> 00:05:06,420
So in the back end slash routers slash to DOS dot pi you are going to include imports here.

64
00:05:06,420 --> 00:05:14,220
Remember is where you are going to include the imports according to the modifications of the version

65
00:05:14,220 --> 00:05:18,840
010 that you already know from long chain.

66
00:05:18,840 --> 00:05:25,620
So remember that instead of doing from long chain import open AI, you will have to do from long chain

67
00:05:25,800 --> 00:05:28,680
a hyphen OpenAI import OpenAI.

68
00:05:28,710 --> 00:05:29,850
You remember that, right?

69
00:05:29,850 --> 00:05:33,300
So please review the video.

70
00:05:33,600 --> 00:05:36,510
We have included the video several times.

71
00:05:36,540 --> 00:05:44,910
Uh, I'm going to include the video also after this one or before this one for you to have that a close

72
00:05:44,910 --> 00:05:46,680
to this, uh, chapter.

73
00:05:47,070 --> 00:05:54,630
So remember that the imports are going to be a little bit different in your case, why this is working

74
00:05:54,630 --> 00:05:55,140
for us?

75
00:05:55,140 --> 00:06:03,360
Because we have this app included in a virtual environment that is configured with a, with an old version

76
00:06:03,360 --> 00:06:04,110
of long chain.

77
00:06:04,110 --> 00:06:04,410
Why?

78
00:06:04,440 --> 00:06:05,940
Because we we did this.

79
00:06:05,940 --> 00:06:09,690
We built this before the, the the version 010.

80
00:06:09,870 --> 00:06:13,410
But the changes you will have to do are very simple okay?

81
00:06:13,410 --> 00:06:14,610
So don't worry about it.

82
00:06:14,610 --> 00:06:17,580
Just remember what you have already learned.

83
00:06:17,580 --> 00:06:20,760
And in case of doubt, you know where to find answers.

84
00:06:21,610 --> 00:06:28,150
So we are going to import OpenAI uh prompt template and also LM chain.

85
00:06:28,150 --> 00:06:35,440
We are going to do, as you know, a very simple, uh, thing with uh, long chain and OpenAI in this

86
00:06:35,440 --> 00:06:36,280
application.

87
00:06:36,280 --> 00:06:44,410
So a uh, first import, then we are going to add a basic long chain code.

88
00:06:44,410 --> 00:06:45,100
Okay.

89
00:06:45,100 --> 00:06:55,060
So in the same file in the back end routers todos.py you can include this code in order to check this

90
00:06:55,060 --> 00:06:57,550
very simple functionality okay.

91
00:06:57,550 --> 00:07:01,660
This is where you are going to try the functionality that you added here.

92
00:07:01,660 --> 00:07:09,790
And in order to check uh that this is working, you can start the back end server in your terminal and

93
00:07:09,790 --> 00:07:11,620
check how this works.

94
00:07:11,620 --> 00:07:12,190
Okay.

95
00:07:12,670 --> 00:07:15,640
And now this is a very simple long chain.

96
00:07:17,800 --> 00:07:18,430
Excuse me.

97
00:07:18,790 --> 00:07:21,040
Very simple launching functionality.

98
00:07:21,950 --> 00:07:29,600
And after that you are going to include the a little bit more advanced functionality that we have in

99
00:07:29,600 --> 00:07:36,230
the demo, which is the the one that writes a poem a after the task included.

100
00:07:36,230 --> 00:07:36,590
Okay.

101
00:07:36,590 --> 00:07:42,680
So this is the functionality you will have to add in the back end routers to do dot pi.

102
00:07:43,370 --> 00:07:48,920
And in the front end you will have to make a few small changes.

103
00:07:48,920 --> 00:07:53,990
Remember that we are including the new button there and the functionality associated with it.

104
00:07:53,990 --> 00:07:59,090
So the you have some changes in the to do component.

105
00:07:59,120 --> 00:08:03,050
Here you have the changes for you to review and and include it.

106
00:08:03,050 --> 00:08:12,980
And once you have that in your front end, you are ready to you already know how to a how to start the

107
00:08:12,980 --> 00:08:14,900
full stack application in your computer.

108
00:08:14,900 --> 00:08:21,710
And if you wish, you also know how to deploy this application into render and Cellcom.

109
00:08:21,710 --> 00:08:24,140
Just follow the same the same procedure.

110
00:08:24,140 --> 00:08:28,790
Okay, so now we have seen one step further.

111
00:08:28,790 --> 00:08:33,500
We started this blog with a simple level three application.

112
00:08:33,500 --> 00:08:39,260
Then we went a little bit farther with a medium level three application.

113
00:08:39,260 --> 00:08:45,830
And now we have a basic level three LM application.

114
00:08:45,830 --> 00:08:51,590
We have integrated orchestration frameworks and also an LM.

115
00:08:51,860 --> 00:08:54,680
So in the next lesson.

116
00:08:55,370 --> 00:09:04,820
We are going to go one step further and we are going to use the medium app we created, the one that

117
00:09:04,820 --> 00:09:17,120
is a loading PDF files in S3 in Amazon S3, and then we are going to use to include the lag functionality

118
00:09:17,120 --> 00:09:18,920
into that app.

119
00:09:18,920 --> 00:09:19,310
Okay.

120
00:09:19,310 --> 00:09:24,740
So we will we are going to do that in the next video.

