Hamza4100's picture
Update README.md
3772615 verified
---
title: Health-Tech RAG Chatbot
emoji: 🏥
colorFrom: blue
colorTo: purple
sdk: docker
app_port: 7860
pinned: false
---
# Backend - AI RAG Chatbot API
## Setup
```bash
cd backend
python -m venv venv
venv\Scripts\activate # Windows
# source venv/bin/activate # Mac/Linux
pip install -r requirements.txt
```
## Configuration
Copy `.env.example` to `.env` and fill in your API keys:
```bash
cp .env.example .env
```
## Run
```bash
uvicorn app.main:app --reload --port 8000
```
## API Endpoints
| Method | Endpoint | Description |
| ------ | ------------------------------- | ---------------------------- |
| GET | `/health` | Health check |
| POST | `/api/ask` | Ask question (non-streaming) |
| POST | `/api/ask/stream` | Ask question (SSE streaming) |
| POST | `/api/ingest` | Upload & ingest document |
| POST | `/api/ingest/batch` | Batch upload documents |
| GET | `/api/conversations` | List conversations |
| GET | `/api/conversations/{id}` | Get conversation |
| DELETE | `/api/conversations/{id}` | Delete conversation |
| DELETE | `/api/conversations` | Clear all conversations |