backend / README.md
m-ahmad-official's picture
Add README for Hugging Face Space
4dd8465
---
title: RAG Chatbot Backend
emoji: πŸ€–
colorFrom: blue
colorTo: purple
sdk: docker
pinned: false
---
# RAG Chatbot Backend API
Backend API for the Humanoid AI Robotics Book Chatbot using RAG (Retrieval-Augmented Generation).
## πŸš€ Features
- FastAPI-based REST API
- OpenAI Agents SDK for intelligent responses
- Qdrant vector database for semantic search
- Cohere embeddings for document retrieval
- CORS enabled for frontend integration
## πŸ“‹ API Endpoints
### Health Check
```
GET /health
```
### Chat
```
POST /chat
Content-Type: application/json
{
"question": "Your question here"
}
```
## βš™οΈ Environment Variables
Set these in Space Settings β†’ Variables and secrets:
- `COHERE_API_KEY` - Cohere API key
- `QDRANT_URL` - Qdrant Cloud URL
- `QDRANT_API_KEY` - Qdrant API key
- `QDRANT_COLLECTION` - Collection name
- `OPENAI_API_KEY` - OpenAI API key
- `AGENT_MODEL` - Model name (e.g., gpt-4o-mini)
## πŸ”— Frontend
Frontend deployed at: https://hackathon-1-humanoid-ai-robotics.vercel.app
## πŸ“ License
Part of the Humanoid AI Robotics Book Chatbot project.