1
00:00:03,260 --> 00:00:06,170
Okay, so here you have the notebook.

2
00:00:06,170 --> 00:00:09,470
This is the main document for you to to read.

3
00:00:09,470 --> 00:00:15,320
And the slides which include a summary of the contents you see in the notebook.

4
00:00:15,320 --> 00:00:21,440
You will also be able to download the code of this exercise from GitHub.

5
00:00:21,440 --> 00:00:29,780
But see here in the notebook the the main steps we are taking in order to to build this Rag application.

6
00:00:30,590 --> 00:00:37,040
So we are going to use the PDF full stack application.

7
00:00:37,040 --> 00:00:42,860
Uh, we build in the in a in a previous lesson, the second application we have built in this block.

8
00:00:42,860 --> 00:00:48,320
And we are going to include some changes to this, uh, to this file.

9
00:00:48,620 --> 00:00:56,480
So remember that you will need to add the OpenAI key in the dot env file in the back end.

10
00:00:56,480 --> 00:01:01,640
Remember you don't want to share this, uh, OpenAI key with anyone.

11
00:01:01,640 --> 00:01:04,730
So remember to update your dot.

12
00:01:04,730 --> 00:01:10,010
Gitignore file in order to avoid you to share the contents of this file.

13
00:01:10,010 --> 00:01:15,260
When you load the content of the project into your GitHub repository.

14
00:01:15,260 --> 00:01:17,420
Okay, so this is important.

15
00:01:17,750 --> 00:01:28,460
Second thing you will need to add the imports, uh, for launching an OpenAI in the back end routers

16
00:01:28,490 --> 00:01:29,390
PDFs.

17
00:01:29,390 --> 00:01:31,340
Uh py file okay.

18
00:01:31,730 --> 00:01:43,400
So remember that, uh, in your case you will have to use a different way of, uh, importing because

19
00:01:43,400 --> 00:01:52,940
you will have to include the changes, uh, of the uh, version 010 from launching.

20
00:01:52,940 --> 00:01:54,380
You know, about that.

21
00:01:54,380 --> 00:01:59,540
We are going to include a reminder video, uh, in this, in this blog as well.

22
00:01:59,540 --> 00:02:02,690
But we have included the reminder several times.

23
00:02:02,690 --> 00:02:08,810
You have a reminder in the in the level one applications block, and you also have the reminder in the

24
00:02:08,810 --> 00:02:10,160
level two applications block.

25
00:02:10,160 --> 00:02:19,310
So remember that the the main change of the uh, version 010 is that instead of importing, for example,

26
00:02:19,310 --> 00:02:27,590
OpenAI in this way from long chain import OpenAI, now you need to use a new package called called long

27
00:02:27,590 --> 00:02:32,450
chain OpenAI to do from long chain OpenAI import OpenAI.

28
00:02:32,480 --> 00:02:34,220
So you remember the changes.

29
00:02:34,220 --> 00:02:43,100
So so please, uh, modify this, uh, code with the new code you need then after you have done it.

30
00:02:43,860 --> 00:02:50,160
You will have to change the code in the in the functionality.

31
00:02:50,160 --> 00:02:50,580
Right.

32
00:02:50,580 --> 00:02:58,650
So this is the simple functionality we, uh, started using in the previous app.

33
00:02:58,650 --> 00:03:05,610
You remember that we initially did a very simple thing and then went to the poem writing.

34
00:03:05,610 --> 00:03:12,030
So this is the simple, uh, and the simple functionality just for you to try it with this, with this

35
00:03:12,030 --> 00:03:12,840
app as well.

36
00:03:13,590 --> 00:03:15,270
You know how to try it.

37
00:03:15,270 --> 00:03:18,990
It's the same way we we did it in the, in the previous exercise.

38
00:03:18,990 --> 00:03:29,550
And now is where uh, here you have the A code you need to enter in the same back end routers pdfs.py

39
00:03:29,610 --> 00:03:30,750
in the same file.

40
00:03:30,750 --> 00:03:39,690
This is the code you need to enter in order to, uh, make a rack technique work in this, uh, in this

41
00:03:39,690 --> 00:03:40,620
application.

42
00:03:40,620 --> 00:03:41,280
Okay.

43
00:03:41,880 --> 00:03:48,840
And in order for this to work, you will need to add all these, uh, imports in the in on the top of

44
00:03:48,840 --> 00:03:49,350
the file.

45
00:03:49,350 --> 00:03:50,100
Okay.

46
00:03:50,100 --> 00:03:57,240
So you will be able to check this new functionality with a, with, uh, your terminal.

47
00:03:57,240 --> 00:03:57,750
Okay.

48
00:03:57,750 --> 00:04:04,890
So this is a way to ask a question to your, uh, PDF, a document.

49
00:04:04,890 --> 00:04:05,430
Okay.

50
00:04:05,430 --> 00:04:11,460
But we are not going to include the front end, uh, changes here.

51
00:04:11,460 --> 00:04:16,529
So this is going to be your first to do, uh, task.

52
00:04:16,529 --> 00:04:16,920
Okay.

53
00:04:16,920 --> 00:04:18,510
So this is going to be your homework.

54
00:04:18,510 --> 00:04:22,620
So we are including a first version of the rack code.

55
00:04:22,620 --> 00:04:32,250
And it will be for you to, uh, update the front end with the knowledge you already have and to fine

56
00:04:32,250 --> 00:04:36,120
tune the, the back end, uh, in that way.

57
00:04:36,120 --> 00:04:36,750
Okay.

58
00:04:36,750 --> 00:04:45,240
So, uh, what we want is that the user selects one PDF file, and then he can enter a question about

59
00:04:45,240 --> 00:04:50,850
it in the in an input box below the main PDF list, uh box.

60
00:04:50,850 --> 00:04:55,320
And after the question is submitted, the answer is displayed below.

61
00:04:55,320 --> 00:04:55,920
Okay.

62
00:04:55,920 --> 00:05:02,550
So take a look at this and try to prepare the front end for uh, this application.

63
00:05:02,550 --> 00:05:03,180
Okay.

64
00:05:03,720 --> 00:05:13,410
So let's go to the next lesson where we are going to deep, uh, to dive deeper into the most advanced

65
00:05:13,440 --> 00:05:16,650
LM application of the, uh, program.

66
00:05:16,650 --> 00:05:19,650
So let's go there in the next video.

