--- 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.