Spaces:
Running
Running
Commit Β·
4dd8465
1
Parent(s): 3f276ab
Add README for Hugging Face Space
Browse files
README.md
CHANGED
|
@@ -1,10 +1,58 @@
|
|
| 1 |
---
|
| 2 |
-
title: Backend
|
| 3 |
-
emoji:
|
| 4 |
-
colorFrom:
|
| 5 |
-
colorTo:
|
| 6 |
sdk: docker
|
| 7 |
pinned: false
|
| 8 |
---
|
| 9 |
|
| 10 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
title: RAG Chatbot Backend
|
| 3 |
+
emoji: π€
|
| 4 |
+
colorFrom: blue
|
| 5 |
+
colorTo: purple
|
| 6 |
sdk: docker
|
| 7 |
pinned: false
|
| 8 |
---
|
| 9 |
|
| 10 |
+
# RAG Chatbot Backend API
|
| 11 |
+
|
| 12 |
+
Backend API for the Humanoid AI Robotics Book Chatbot using RAG (Retrieval-Augmented Generation).
|
| 13 |
+
|
| 14 |
+
## π Features
|
| 15 |
+
|
| 16 |
+
- FastAPI-based REST API
|
| 17 |
+
- OpenAI Agents SDK for intelligent responses
|
| 18 |
+
- Qdrant vector database for semantic search
|
| 19 |
+
- Cohere embeddings for document retrieval
|
| 20 |
+
- CORS enabled for frontend integration
|
| 21 |
+
|
| 22 |
+
## π API Endpoints
|
| 23 |
+
|
| 24 |
+
### Health Check
|
| 25 |
+
|
| 26 |
+
```
|
| 27 |
+
GET /health
|
| 28 |
+
```
|
| 29 |
+
|
| 30 |
+
### Chat
|
| 31 |
+
|
| 32 |
+
```
|
| 33 |
+
POST /chat
|
| 34 |
+
Content-Type: application/json
|
| 35 |
+
|
| 36 |
+
{
|
| 37 |
+
"question": "Your question here"
|
| 38 |
+
}
|
| 39 |
+
```
|
| 40 |
+
|
| 41 |
+
## βοΈ Environment Variables
|
| 42 |
+
|
| 43 |
+
Set these in Space Settings β Variables and secrets:
|
| 44 |
+
|
| 45 |
+
- `COHERE_API_KEY` - Cohere API key
|
| 46 |
+
- `QDRANT_URL` - Qdrant Cloud URL
|
| 47 |
+
- `QDRANT_API_KEY` - Qdrant API key
|
| 48 |
+
- `QDRANT_COLLECTION` - Collection name
|
| 49 |
+
- `OPENAI_API_KEY` - OpenAI API key
|
| 50 |
+
- `AGENT_MODEL` - Model name (e.g., gpt-4o-mini)
|
| 51 |
+
|
| 52 |
+
## π Frontend
|
| 53 |
+
|
| 54 |
+
Frontend deployed at: https://hackathon-1-humanoid-ai-robotics.vercel.app
|
| 55 |
+
|
| 56 |
+
## π License
|
| 57 |
+
|
| 58 |
+
Part of the Humanoid AI Robotics Book Chatbot project.
|