You should make sure Python 3.11 is already installed on your local machine. And plus, python3.11-venv must be installed.
- clone the repository from GitHub.
git clone https://github.com/eagerbeaver53/langchain-qa-system.git
cd langchain-qa-system/
- Create python virtual environment.
# I would like to create virtual environment using python3.11-venv.
pip install --upgrade pip
python -m venv env
source env/bin/activate
- Install required packages.
pip install -r requirements.txt
All done successfully!!! Now you can finish setting up the project.
- Create environment variable for the project.
cp example.env .env
-
Edit the environment variable with your options.
-
Paste the JSON file of predefined questions and answers in any directory.
OPENAI_API_KEY
: OpenAI API KeyCHROMA_DB_DIRECTORY
: The location of The local ChromaDB vectorstore.
- Run
app/main.py
file in the virtual environment.
source env/bin/activate
gunicorn --bind 0.0.0.0:8000 app.main:app -k uvicorn.workers.UvicornWorker --timeout 1500 --reload
- The ChromaDB doesn't care about the double storing of same documents so please make sure you don't store same documents twice.
- If you want to embed documents to new database, Deleting
CHROMA_DB_DIRECTORY
will be the solution.