Rebuild & Deploy / rebuild (push) Successful in 3m18s
- Point the agent at OpenWebUI's OpenAI-compatible API (LLM_BASE_URL,
LLM_API_KEY, LLM_MODEL) with GEMMA_* env fallbacks
- Add list_available_models() fetching {base_url}/models, filtering
non-chat ids (embedding/reranker)
- Rename GemmaLLM -> HopeLLM with update_options(model=...) for runtime
model switching (mutates _opts.model) and instance-based compaction
- Data channel: agent publishes {type: models} after connect and on
get_models; set_model switches live and acks model_changed
- Web UI: Brain section in the settings sheet with a model picker that
persists the choice in localStorage
- Update tests, CI workflow env, and docs for the new endpoint
63 lines
2.1 KiB
YAML
63 lines
2.1 KiB
YAML
name: Rebuild & Deploy
|
|
|
|
on:
|
|
push:
|
|
branches: [master]
|
|
paths-ignore:
|
|
- '*.md'
|
|
|
|
jobs:
|
|
rebuild:
|
|
runs-on: runner-voice
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Build image
|
|
run: docker build -t hope-voice-api-voice:latest .
|
|
|
|
- name: Restart container
|
|
env:
|
|
AZURE_SPEECH_KEY: ${{ secrets.AZURE_SPEECH_KEY }}
|
|
run: |
|
|
docker stop voice 2>/dev/null || true
|
|
docker rm voice 2>/dev/null || true
|
|
docker run -d \
|
|
--name voice \
|
|
--network host \
|
|
--restart unless-stopped \
|
|
--health-cmd='curl -sk https://localhost:${WEB_PORT:-9178}/ -o /dev/null && curl -s http://localhost:7880/ -o /dev/null' \
|
|
--health-interval=15s \
|
|
--health-timeout=5s \
|
|
--health-retries=3 \
|
|
--health-start-period=20s \
|
|
-v /mnt/user/dev/hope-voice-api/certs:/etc/voice/certs \
|
|
-v /mnt/user/dev/hope-voice-api/skills:/skills \
|
|
-v /mnt/user/dev/hope-voice-api/livekit.yaml:/etc/livekit.yaml:ro \
|
|
-e LIVEKIT_URL=http://localhost:7880 \
|
|
-e LIVEKIT_API_KEY=devkey \
|
|
-e LIVEKIT_API_SECRET=hopevoice-devsecret-2026-lan-only \
|
|
-e AZURE_SPEECH_KEY="$AZURE_SPEECH_KEY" \
|
|
-e AZURE_SPEECH_REGION=eastus \
|
|
-e AZURE_TTS_VOICE=en-US-Ava:DragonHDOmniLatestNeural \
|
|
-e LLM_BASE_URL=http://192.168.86.2:3005/api \
|
|
-e LLM_MODEL=gemma-4-e4b \
|
|
-e LLM_API_KEY=sk-4e9259e3bd56472db57fd40adf0fe567 \
|
|
-e WEB_MCP_ENABLED=true \
|
|
-e FIRECRAWL_BASE=http://192.168.86.2:3002 \
|
|
-e WEB_PORT=9178 \
|
|
-e VOICE_USERS_FILE=/etc/hope/users.json \
|
|
-e VOICE_DEFAULT_USER=shane \
|
|
hope-voice-api-voice:latest
|
|
|
|
- name: Verify deployment
|
|
run: |
|
|
for attempt in $(seq 1 12); do
|
|
if [ "$(docker inspect --format='{{.State.Health.Status}}' voice 2>/dev/null)" = "healthy" ]; then
|
|
exit 0
|
|
fi
|
|
sleep 5
|
|
done
|
|
docker logs voice
|
|
exit 1
|