This is a minimal implementation of the RAG model for question answering.
- Python 3.8 or later
- Download and install MiniConda from here
- Create a new environment using the following command:
$ conda create -n mini-rag python=3.8- 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 .envSet your environment variables in the .env file. Like OPENAI_API_KEY value.
$ cd docker
$ cp .env.example .env- update
.envwith your credentials
$ cd docker
$ docker ps -a
# Stop and remove all containers, images, and volumes
$ docker stop $(docker ps -a -q)
$ docker rm $(docker ps -a -q)
$ docker rmi $(docker images -q)
$ docker volume rm $(docker volume ls -q)
$ docker system prune -all
# Build and start the services in detached mode
$ 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