This project documents my learning journey with LangGraph, featuring incremental updates saved in separate files.
To get started with this project, follow these steps:
-
Clone the repository:
git clone https://github.com/dev-arctik/LangGraph_Learning.git cd LangGraph_Learning
-
Install Poetry (if not already installed):
# On macOS and Linux curl -sSL https://install.python-poetry.org | python3 - # On Windows (PowerShell) (Invoke-WebRequest -Uri https://install.python-poetry.org -UseBasicParsing).Content | python -
-
Install dependencies using Poetry:
poetry install
-
Activate the Poetry virtual environment:
poetry shell
To run the code effectively, create a .env
file in the root directory to store your API keys and configuration settings. This is necessary for using the various APIs involved in the project.
You can use the provided .env.example
file as a template:
cp .env.example .env
Then edit the .env
file with your actual API keys.
You will get the langsmith api (optional) on langsmith Website
The .env
file should contain the following variables:
# OpenAI
OPENAI_API_KEY="your_openai_api_key_here"
# LangSmith
LANGCHAIN_TRACING_V2=true
LANGCHAIN_ENDPOINT="https://api.smith.langchain.com"
LANGCHAIN_API_KEY="your_langchain_api_key_here"
LANGCHAIN_PROJECT="your_project_name_here"
# Tavily
TAVILY_API_KEY="your_tavily_api_key_here"
Replace 'your_openai_api_key_here' with your actual OpenAI API key.
Note: If you choose to use a different LLM (Language Learning Model), refer to the LangChain documentation and adjust the code as needed.
You can run individual files with the following command:
poetry run python [file_name.py]
Alternatively, if you have activated the Poetry shell:
python [file_name.py]
I am learning from the LangChain Academy and Blogs by langchain team. Special thanks to the LangChain community for their support and resources.