In this class, we will discuss chaining and introduce the LangChain Expression Language (LCEL), which helps build chains more quickly and conveniently.
Before you begin, ensure you have met the following requirements:
- You have installed Python 3.6+.
First, clone the repository to your local machine using the following command:
git clone [repository-url]
cd [repository-name]
Create a virtual environment using venv
:
python3 -m venv venv
Activate the virtual environment:
- On Windows:
venv\Scripts\activate
- On MacOS/Linux:
source venv/bin/activate
Install the required packages using pip
:
pip install -r requirements.txt
Create a .env
file in the root directory of the project. Use the .env.sample
file as a reference:
cp .env.sample .env
Open the .env
file and update the key values as necessary.
Run the environment setup script:
export OPENAI_API_KEY=[your-key-here]
export LANGCHAIN_API_KEY=[your-key-here]
export LANGCHAIN_TRACING_V2=true
export LANGCHAIN_PROJECT=default
If you have a mac, run the Homebrew script inside the multi_modal_RAG_chroma.ipynb
:
! brew install tesseract
! brew install poppler
To run any in-class examples, execute the specific file directly from the command line. For example:
python3 in_class_examples/[file-name]