This is a minimal implementation of the RAG model for question answering.
- Python 3.10
sudo apt update
sudo apt install libpq-dev gcc python3-dev- Download and install MiniConda from here
- Create a new environment using the following command:
$ conda create -n mini-rag python=3.10- Activate the environment:
$ conda activate mini-ragexport PS1="\[\033[01;32m\]\u@\h:\w\n\[\033[00m\]\$ "$ pip install -r requirements.txt$ cp .env.example .env$ alembic upgrade headSet your environment variables in the .env file. Like OPENAI_API_KEY value.
$ cd docker
$ cp .env.example .env- update '.env' with your credentials
$ cd docker
$ sudo docker compose up -d$ uvicorn main:app --reload --host 0.0.0.0 --port 5000Download the POSTMAN collection from /assets/mini-rag-app.postman_collection.json