Update the simple-chatbot demo to have JS and React clients

This commit is contained in:
Mark Backman
2024-12-04 21:13:14 -05:00
parent c395d1a234
commit 1d11419691
2634 changed files with 179150 additions and 328 deletions

View File

@@ -0,0 +1,43 @@
# Simple Chatbot Server
A FastAPI server that manages bot instances and provides endpoints for both Daily Prebuilt and RTVI client connections.
## Endpoints
- `GET /` - Direct browser access, redirects to a Daily Prebuilt room
- `POST /connect` - RTVI client connection endpoint
- `GET /status/{pid}` - Get status of a specific bot process
## Environment Variables
Copy `env.example` to `.env` and configure:
```ini
DAILY_API_KEY= # Your Daily API key
DAILY_API_URL= # Optional: Daily API URL (defaults to https://api.daily.co/v1)
OPENAI_API_KEY= # Your OpenAI API key
CARTESIA_API_KEY= # Your Cartesia API key
HOST= # Optional: Host address (defaults to 0.0.0.0)
FAST_API_PORT= # Optional: Port number (defaults to 7860)
```
## Running the Server
Set up and activate your virtual environment:
```bash
python3 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
```
Install dependencies:
```bash
pip install -r requirements.txt
```
Run the server:
```bash
python server.py
```