/pyrag

Primary LanguagePython

PyRag

Welcome to PyRag, a python RAG implementation

PyRag setup.

Create python virtual environment:

$ py -m venv .venv

Activate python virtual environment:

$ .venv\scripts\activate

Update pip package installer

$ pip3 install --upgrade pip

Add the following requirements to "requirements.txt" file:

  • jupyter
  • playwright

Install the requirements:

$ python -m pip install -r requirements.txt

Add a dotenv (.env) file.

Add Open AI API key to the dotenv file.

$ OPENAI_API_KEY="..."

Run the PyRag chat:

$ py pyrag.py

PyRag execution.

The following screenshot is a PyRag execution example.

sample.png sample.png

PyRag with jupyter notebooks.

Launch jupyter server on port 9999:

$ jupyter notebook --port 9999