Hey there Eden here.
And in this video, we're going to be setting up our environment before we implement the documentation
helper.
So we're going to start by cloning the starting branch with all the boilerplate code that we need.
And we're going to set up our env file which is going to holding the environment variables for our OpenAI
API key and our pinecone API key.
Okay.
So in the repository we want to be cloning the branch one.
Start here.
So I'm going to go and copy this code this URL.
And I'm going to go to the terminal I'm going to write git clone paste the URL dash b one.
Start here.
And this will clone the repository in the beginning branch.
So we'll start by listing the current working directory of our project.
Okay, so now it's time to go to pinecone to log in to our user and to create an index that is going
to store the embeddings of the documentation of blockchain.
So now let's give our index a meaningful name, so I'll call it long chain dash doc dash index.
And we're going to tell pinecone which embeddings model we're going to be using to index our documents.
So we're going to choose text embeddings really small of OpenAI.
The dimension.
So the size of the vector is going to be 1536.
And here we're going to be using cosine similarity to determine the distances between the vectors.
All right.
By the way this is the new pinecone UI.
So it's pretty similar.
Um you here can write your index name and and yeah here in order to choose the embedding model, this
is how the UI looks.
And make sure you select the one 536 um in the embeddings dimension.
Um, yeah.
So this is the new UI in pinecone.
Just important to show you this.
All right.
Let's go and set configuration.
We're going to go with the serverless option here.
And we're simply now creating the index.
And in a couple of seconds our index will be initialized.
Relaxed.
By the way, notice that our index is deployed on AWS cloud and this is the region.
Now we have flexibility on this.
Let's say we want to deploy it on Google Cloud.
Then we simply needed to mark the Google Cloud logo and it will be deployed there.
And this is important because AWS customers would want their index to be hosted on AWS.
And GCP customers would want it to be hosted on Google Cloud.
So this helps with latency and with commercial agreements of companies working with those cloud providers.
And the region is important, for example, for GDPR compliance.
So for that, we'll need our vector store to be deployed only in a Europe data center.
All right.
So now we can ingest the documents of the documentation into our index.
So link chain is going to be making requests to pinecone on behalf of us.
So we need to copy your API key and give it to link chain.
So let's copy it and let's put it in the dot env file.
And let me open now the project in PyCharm for the first time in this video and I created a dot env
file, which of course I didn't commit to the repository because I don't want to commit any secrets
anyway.
So I created a dot env file and in the dot env file I'll create.
I'll simply put here the pinecone API key which I copied.
And also we need to plug in of course the OpenAI API key or any other LLM vendor you're using.
All right.
So I want to deactivate my virtual environment my automatic one.
And I want now to take a look at the Pip file.
And here we have all the packages we need for our project which I already pre-prepared.
And you can see for example we have Lang Lang pinecone.
And if I'm going to look at the log file with the exact versions we can see, we have for example the
latest version currently of Linkchain 0.26.
And I remind you, you might have a different version depending when you're taking the course.
Of course, I'll keep updating this course and the repository to be updated with the latest version.
So if there are breaking changes I will update the code of course, and the videos.
All right.
So I just want to address a couple of things.
I added a new logger.py file, which you should be seeing on the left side as well.
This is something which I added now as the boilerplate.
We're going to be using it in future videos.
And this backend directory you can ignore.
We'll be creating it in future videos.
And also this docs directory you can ignore will be downloading the link chain docs in the next couple
of videos.
All right so now I want to run Pipenv install.
And this will take all the information in the pip file dot log file.
And it's going to install all the dependencies with the correct versions.
So if you run that you're going to have the exact same version as I'm having right now of all the packages.
So we're going to create a new file I'll call it ingestion.py.
And this file is going to hold all of the implementation of ingestion the link chain documentation embedding
it into vectors then storing those vectors into pinecone the vector store.