- Python 3.10+
- Docker Desktop installed and running
- A Groq API key from console.groq.com
git clone https://github.com/scewdoosh/ragFlow
cd ragFlowRun the following command in the root folder to pull and start Qdrant and Valkey:
docker compose up -dWindows
python -m venv venv
venv\Scripts\activateMac / Linux
python3 -m venv venv
source venv/bin/activatepip install -r requirements.txtCreate a .env file in the root folder:
GROQ_API_KEY=your_groq_api_key_here
Navigate one level above the project folder and run:
cd ..
python -m ragFlow.mainOpen a new terminal, activate the venv, navigate one level up, then run:
Windows
venv\Scripts\activate
cd ..
rq worker --worker-class rq.SimpleWorkerMac / Linux
source venv/bin/activate
cd ..
rq worker --worker-class rq.SimpleWorkerNote: The more workers you run, the more requests can be processed concurrently.
Open http://localhost:8000/docs in your browser to access the interactive API docs.
| Method | Endpoint | Description |
|---|---|---|
GET |
/hello |
Health check confirms the server is running |
POST |
/upload_pdf |
Upload a PDF by providing its local file path |
POST |
/chat |
Submit a query returns a job_id |
GET |
/response |
Fetch the answer using the job_id |
-
Upload your PDF
- Hit
POST /upload_pdfwith your local PDF path, e.g.C:/folder/filename.pdf(Windows) or/home/user/filename.pdf(Mac/Linux) - Wait for the success message before querying
- Hit
-
Ask a question
- Hit
POST /chatwith your query - Copy the
job_idfrom the response
- Hit
-
Get your answer
- Hit
GET /responsewith thejob_id - The answer will include the relevant page numbers from the PDF
- Hit
- FastAPI REST API
- RQ (Redis Queue) Async job processing
- Valkey Redis compatible message broker
- Qdrant Vector database
- HuggingFace Embeddings
sentence-transformers/all-MiniLM-L6-v2 - Groq LLM inference