A small independent project running Ollama mistral code for private PDF insights. Additonally, FastAPI python server for incoming requests of questions. It process the contents before hand and keeps the data in ChromaDB on disk. A quesy can be processed with max. delay of 2 minutes. Still possible to reduce further. Please note that Ollama runs on port 11434 and no API has been changed.
Please update the external : true enviorment variable in docker compose file as per requirement.
To deploy this project run
docker compose up -dThe mistral image is not installed by default, run command:
docker compose exec ollama ollama pull mistralVerify the model is installed
docker compose exec ollama ollama listTo start only rag-service or ollama
docker compose up -d rag-service
docker compose up -d ollamaTo run tests, run the following command
curl -X PUT "http://localhost:8000/ask" \
-H "Content-Type: application/json" \
-d '{"question": "What is political economy?"}'To check the status
curl http://ollama:11434To test the health status
curl http://ollama:11434/health