This is a Retrieval-Augmented Generation (RAG) application using Langchain, OpenAI, and Pinecone for movie history.
- Chat
- Question Answering (QA)
-
Create a virtual environment:
python -m venv venv
-
Activate the virtual environment:
- On Windows:
venv\Scripts\activate
- On macOS and Linux:
source venv/bin/activate
- On Windows:
-
Install dependencies:
pip install -r requirements.txt
-
Set up environment variables:
Create a
.env
file in the root directory of your project and add the following variables:OPENAI_API_KEY="" PINECONE_API_KEY="" PINECONE_INDEX_NAME="movie-history" FEATURE_NAME="chat" # "qa"
->
FEATURE_NAME
will bechat|qa
. diff is chat will preserve history
-
Load the data into Pinecone:
python ./src/vector_store/load_data.py
-
start project with gradio ui
python app.py
127.0.0.1:7860