A Retrieval-Augmented Generation API for the Climate Academy student book. Built with Flask, Celery, Redis, ChromaDB, Sentence Transformers, and Ollama.
- Flask + Gunicorn — REST API
- Celery + Redis — async task queue and session store
- ChromaDB — vector database
- all-MiniLM-L6-v2 — local embeddings
- Ollama (Llama 3.1 8B) — local LLM inference
uv synccp .env.example .env
# Edit .env if neededollama pull llama3.1:8buv run python ingest.pyTerminal 1 — Flask:
uv run python run.pyTerminal 2 — Celery:
uv run celery -A app.tasks worker --concurrency=2 --loglevel=info| Method | Endpoint | Description |
|---|---|---|
| GET | /health | Health check |
| POST | /session | Create a new session |
| DELETE | /session/ | Clear a session |
| POST | /chat | Send a message (returns task_id) |
| GET | /result/<task_id> | Poll for result |