Hey there, Eden here.
And in this video we're going to do all of the boilerplate setup.
We're going to set up a virtual environment with poetry.
We're going to install all the dependencies.
We're going to fill out the env file with all the API keys that we need.
And after this video we'll be ready to implement our react graph graph.
So we have now an empty directory.
Let's go and initialize our poetry project with poetry init.
And let me go now and click enter for everything.
All right so we have a poetry project.
Let's go and add a new file here.
Let's call it.
Gitignore.
And here I'm simply going to paste here a standard Python.
Gitignore file.
And what's important to me here is that it won't add into GitHub any env files.
So I won't expose in GitHub any API keys.
And you can take the content of the.
Gitignore file from the repository or from the videos resources where I'm going to attach the content
of this file.
All right.
So let's go now and install the packages that we need.
Of course we want to install link chain.
We want link chain OpenAI.
We want link chain Tahvili for search.
We want to install Lang graph.
And we want to install Python env to load the environment variables.
And let's also install black and eishort for some formatting that we'll do after we finish coding everything.
So right now we're installing all the dependencies and all the packages that we need.
And we'll be implementing everything with link graph.
All right so we finished installing everything.
Let's go and check our project.toml file.
And we can see all of the dependencies installed.
And let's go and create now a dot env file.
And let me paste in all the environment variables that we will need for this project.
And don't worry about me exposing my API keys.
I revoked them before I published this video.
Let's quickly review the content here.
So we want to use the OpenAI API key.
So we'll be able to create LLM calls.
And to use the OpenAI Llms we want to enable link chain tracing.
And for that we'll be needing to put the link chain API key.
And we want to enable link chain tracing v2 equals to true.
And I'll call the project react function calling.
So all those values over here is to enable tracing for our graph graph and for the API calls we make
to OpenAI.
And lastly we also want to add API key to use the search API.
Cool.
Let's go now and create a new file.
Let's call this file Main.py.
And this is where we're going to run everything from our project.
And let's write if name equals main.
And let's go print something like hello react lang graph with function calling.
All right, let me print this just as a sanity check.
And I want now to import from dot env.
I want to import load dot env and to load the environment variables.
And here we simply printed the OpenAI API key just as a sanity check to see that we loaded the correct
values.
So let's go and let's try to run this.
And we can see now the value of the API key.
So this is working as expected.
And we can remove this now from the code.
Alrighty.
So let's now go and create two files here.
So I want to create a file called react.py.
And this file is going to be holding our reasoning engine.
And let's also create a node.py file.
And this file is going to have and hold the implementation of our graph nodes.
And in the following videos we're going to implement this.
Great.
So this is pretty much it for this video.
Right now I am going to commit those changes.
So you can see this available code.
And you can clone it if you want.
And you can have it as a reference.
Let me write git add and let's see all the files that we created.
So let me go now and commit those changes and we'll call it Project Setup.
And let's go and push it into our repository.
Alrighty.
And if you want to check it out you can go to the repository.
And here in the branches go and select the branch project slash react async function calling.
And here you can see in go to the commit list.
And you'll have this commit that you're seeing right now which has the implementation for everything
we did in this video.