FastAPI demo app with a simple guardrails pipeline, Groq chat completions, and Qdrant-backed retrieval.
- Python 3.10+
- Docker and Docker Compose
- Groq API key
Create a local .env file from the example:
cp .env.example .envThen set GROQ_API_KEY in .env.
For Docker Compose, keep:
QDRANT_HOST=qdrant
QDRANT_PORT=6333For running the app directly on your machine, use:
QDRANT_HOST=localhost
QDRANT_PORT=6333docker compose up --buildThe API will be available at:
http://localhost:8000
Start Qdrant:
docker compose up qdrantInstall dependencies and run FastAPI:
python -m venv .venv
.venv\Scripts\activate
pip install -r requirements.txt
uvicorn app.main:app --reloadHealth check:
GET /Chat:
POST /chat?user_input=What%20are%20AI%20guardrails%3Fgit init
git add .
git commit -m "Initial commit"
git branch -M main
git remote add origin <your-repository-url>
git push -u origin mainThe real .env file is ignored so API keys are not pushed.