This project demonstrates how to use LangChain to create and manage language model chains using LangChain's Expression Language (LCEL).
Before you start, ensure you have Python 3.9 or higher installed on your system. You will also need pip
for installing the dependencies.
- Clone this repository to your local machine.
- Navigate to the project directory.
- Install the required dependencies by running:
pip install -r requirements.txt
The requirements.txt
file includes the following packages:
- dotenv
- langchain
- langchain_openai
- langchain_core
To configure the project, you need to set up your environment variables:
- Copy the
example.env
file to a new file named.env
. - Replace
YOUR_OPENAI_API_KEY
andYOUR_SERP_API_KEY
with your actual API keys.
OPENAI_API_KEY=YOUR_OPENAI_API_KEY
SERP_API_KEY=YOUR_SERP_API_KEY
Ensure that the .env
file is listed in your .gitignore
to keep your API keys secure.
To run the project, execute the following command in your terminal:
python3 app.py
This script will start the application using the configuration specified in your .env
file. Look at the example.env
file for the expected variables.