This project documents my learning journey with LangChain, 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/LangChain-Learning.git cd LangChain_Learning
-
Create a virtual environment (optional but recommended):
python -m venv venv
-
Activate the virtual environment:
-
On macOS and Linux:
source venv/bin/activate
-
On Windows:
venv\Scripts\activate
-
-
Install the required packages:
pip install -r requirements.txt
To run the code effectively, create a .env
file in the root directory to store your API key. This is necessary for using the OpenAI models.
Create a .env
file and add the following line:
OPENAI_API_KEY='your_openai_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:
python [file_name.py]