WEBVTT

00:00.240 --> 00:01.520
Hey there, Ethan here.

00:01.520 --> 00:06.480
And in this video, we'll be setting up our project of our reflection agent.

00:06.800 --> 00:13.440
So we'll create the project directory, and we'll use poetry to create our virtual environment and to

00:13.480 --> 00:15.000
install our dependencies.

00:15.240 --> 00:21.400
We'll then open PyCharm and configure it to point to the virtual environment we are using.

00:22.200 --> 00:29.520
And we'll create a dot env file that will hold all of our open AI API keys and Lamb-smith API keys,

00:29.520 --> 00:32.240
because we're going to be using Lamb-smith for tracing.

00:33.000 --> 00:38.040
By the way, all of the code of this video and the rest of the series is going to be on GitHub.

00:38.040 --> 00:41.240
So for this section it will be on the branch one.

00:41.280 --> 00:42.160
Start here.

00:43.880 --> 00:48.280
So in case you need to compare something you want to check out which versions I'm using.

00:48.280 --> 00:49.880
So feel free to check it out.

00:51.080 --> 00:57.400
Alrighty let's go and CD into desktop and I will creating a new directory.

00:57.400 --> 00:59.640
And I'm going to call it Land Graph Course.

01:00.320 --> 01:06.320
And let's go into this new directory and let's initialize our poetry environment.

01:06.320 --> 01:08.590
So I'm going to write poetry init it.

01:08.910 --> 01:12.750
I'm going to click enter and continue with the setup.

01:13.190 --> 01:18.950
And right now I have my poetry environment setup and I have a pyproject.toml file.

01:18.990 --> 01:20.070
Let's check it out.

01:20.750 --> 01:22.710
Nothing is yet installed.

01:22.710 --> 01:25.270
So let's go now and install everything.

01:25.630 --> 01:29.670
So I'm going to write poetry add and let's install Beautifulsoup.

01:29.870 --> 01:35.110
And we need this because link chain will use this library when it's going to download files from the

01:35.110 --> 01:37.710
web that we're going to ingest into our vector store.

01:38.710 --> 01:45.110
Let's install link chain link graph link chain hub.

01:46.590 --> 01:52.870
And we also want link chain community because we're going to be using third party loaders for loading

01:52.870 --> 01:53.790
our documents.

01:54.510 --> 01:59.230
Let's also install the SDK for our search engine.

02:01.710 --> 02:06.030
And I want to install chroma as our open source vector store.

02:07.310 --> 02:10.910
We want Python env for our environment variables.

02:11.510 --> 02:13.870
Black and I thought for formatting.

02:14.390 --> 02:22.500
And lastly let's also install Pytest because we're going to be writing tests and we love writing tests,

02:22.500 --> 02:23.100
don't we?

02:23.460 --> 02:28.700
And writing tests in generative applications is something which is super important.

02:28.700 --> 02:32.860
That's why it was really important for me to include testing in this course.

02:33.700 --> 02:37.260
And let's hit enter and install all those packages.

02:40.020 --> 02:41.580
So it's going to take a minute.

02:41.940 --> 02:43.900
So let me just fast forward it.

02:45.820 --> 02:48.180
And all of our packages are installed.

02:48.540 --> 02:51.260
We want now to open everything in PyCharm.

02:51.260 --> 02:54.180
So I'm going to select the project directory.

02:55.180 --> 02:56.140
It's going to be here.

02:57.220 --> 03:01.980
And we can see that PyCharm detected my poetry environment I'm going to approve it.

03:02.340 --> 03:05.780
And we are now indexing all of our packages.

03:06.380 --> 03:11.980
And if we'll take a look at our pyproject.toml file, we can see all the versions that we are using

03:11.980 --> 03:12.820
at the moment.

03:13.060 --> 03:19.180
And I will be updating the courses repository to be with the latest link chain and Landgraf versions

03:19.180 --> 03:19.900
all the time.

03:20.420 --> 03:26.290
Alrighty, let's go and create a new file and it's going to be our dot env file, which is going to

03:26.330 --> 03:28.610
hold all of our environment variables.

03:28.610 --> 03:35.930
So I'm simply going to paste them in and I'm going to put the OpenAI API key the API key.

03:36.290 --> 03:39.170
And we're going to enable Laxmi Tracing.

03:39.530 --> 03:42.610
We're going to call the Linux Mint project Chirag.

03:42.930 --> 03:47.050
We'll be needing our API key for our search engine.

03:47.370 --> 03:52.370
And I defined the Python path to point to the project's root directory.

03:53.090 --> 03:53.730
Alrighty.

03:53.730 --> 03:56.010
Let's create now our main file.

03:59.010 --> 04:04.130
And here we want to simply write the boilerplate code to first load the environment variables.

04:04.130 --> 04:09.450
And then to print something we'll print hello Advanced Rag.

04:10.090 --> 04:17.130
And let's as a sanity check run it and see that everything is working amazing.

04:17.130 --> 04:20.170
So we can see everything is working correctly.

04:21.130 --> 04:25.650
And if you want you can go to the courses repository at the branch one.

04:25.650 --> 04:28.570
Start here to check out the code.

04:28.570 --> 04:32.410
In the next video we'll cover the repository structure.
