This is minimal implementation of the RAG model for question answering.
- Python 3.8 or later
sudo apt update
sudo apt install libpq-dev gcc python3-dev
-
Download and install MiniConda From [here] (https://www.anaconda.com/docs/getting-started/miniconda/install)
-
Create a new environnement using the following command:
$ conda create -n mini-rag python=3.8- Activate the environment:
$ conda activate mini-rag-appexport 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
$ docker-compose up $ uvicorn main:app --reload --host 0.0.0.0 --port 5000download the POSTMAN collection from /assets/mini-rag-app.postman_collection.json