Broken AI server Part 1
its 5:30 in the morning
This commit is contained in:
46
V3.1/build/ai_bridge_server/README.md
Normal file
46
V3.1/build/ai_bridge_server/README.md
Normal file
@@ -0,0 +1,46 @@
|
||||
# Jibo AI Bridge Server
|
||||
|
||||
This is a small companion server you run on your PC (same machine as Ollama).
|
||||
It gives the robot a stable HTTP target and keeps the on-robot code modular.
|
||||
|
||||
## Endpoints
|
||||
|
||||
- `POST /v1/chat/text` JSON: `{ "text": "..." }` → `{ "reply": "..." }`
|
||||
- `POST /v1/chat/audio` JSON: `{ "wav_base64": "..." }` → `{ "reply": "...", "text": "<transcript>" }`
|
||||
|
||||
## Requirements
|
||||
|
||||
- Python 3.9+
|
||||
- Ollama running locally
|
||||
- default Ollama chat URL: `http://127.0.0.1:11434/api/chat`
|
||||
|
||||
Optional (for AUDIO mode):
|
||||
- `faster-whisper` + `ffmpeg`
|
||||
|
||||
## Run
|
||||
|
||||
From this folder:
|
||||
|
||||
- `python3 server.py --host 0.0.0.0 --port 8020`
|
||||
|
||||
Environment variables (optional):
|
||||
|
||||
- `OLLAMA_MODEL` (default `phi3.5`)
|
||||
- `OLLAMA_URL` (default `http://127.0.0.1:11434/api/chat`)
|
||||
- `WHISPER_MODEL` (default `base`)
|
||||
|
||||
Note: Ollama can stay bound to `127.0.0.1:11434` on your PC; the robot only talks to this bridge server (`:8020`).
|
||||
|
||||
Install optional STT deps:
|
||||
|
||||
- `pip install faster-whisper`
|
||||
- install `ffmpeg` (platform-specific)
|
||||
|
||||
## Robot configuration
|
||||
|
||||
Open the tunables UI (`http://<robot-ip>:3333`) and set:
|
||||
|
||||
- **Jibo AI Bridge → Server URL**: `http://<your-pc-ip>:8020`
|
||||
- **Jibo AI Bridge → Input**:
|
||||
- `AUDIO` (records a short WAV clip on the robot and sends it)
|
||||
- `TEXT` (uses `globalTurnResult` ASR text if available)
|
||||
Reference in New Issue
Block a user