/rag

Primary LanguagePython

Proof of concept for rag based chat application

Setup

  • Set your OPENAI_API_KEY environment variable
  • Download the PDF files you want to use as your data source and put them in the rags folder (only PDF supported at the moment)
  • The system prompt is loaded from system_prompt.txt. Edit the file as necessary.

Running

  1. Create a python virtualenv using python -m venv .venv
  2. Activate the virtualenv using . ./.venv/bin/activate
  3. Install dependencies using pip install -r requirements.txt
  4. Launch the app with python run.py which will start a webserver on port 5000
  5. Open a browser to http://localhost:5000 and begin chatting