mirror of
https://github.com/Alkatrazz24/Funk-lab.git
synced 2026-07-09 07:44:42 +02:00
Sépare STT en deux : - stt/client/ : commande `stt` (pipx), voix locale (Whisper/Piper) + HUD ; envoie le texte au serveur via api.py (ServerClient → POST /v1/ask). URL serveur paramétrable, pas de cerveau local (suppression du routeur 3 modes). - stt/server/ : STT-server FastAPI (conteneur), /healthz + /v1/ask → LiteLLM (Qwen3/Claude). Déploiement cluster : - k8s/apps/stt/ : Deployment, Service, IngressRoute (stt.lab.local), litellm-ext (Service + Endpoints → 192.168.10.1:4000 pour joindre LiteLLM hors cluster) - k8s/apps-of-apps/apps/stt.yaml : Application ArgoCD (depuis main) - .github/workflows/build-stt-server.yml : build/push image → ghcr.io/alkatrazz24/funk-stt-server Inférence/chat seulement (outils Hermes 'agir sur Funk' = phase ultérieure, API :8080 à spécifier). Vérifié : py_compile client+serveur, YAML manifests, ServerClient. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013FmcxGsyXZXogiAHQLjnZT
1.7 KiB
1.7 KiB
STT-server — orchestrateur AI (in-cluster)
API FastAPI déployée dans le cluster k8s (namespace ai). Reçoit les requêtes des clients
STT et route l'inférence vers LiteLLM (s01) → Qwen3 (g01) / Claude.
API
| Méthode | Route | Corps | Réponse |
|---|---|---|---|
GET |
/healthz |
— | {status, version} |
POST |
/v1/ask |
{text} |
{reply} |
Configuration (variables d'env)
| Var | Défaut | Rôle |
|---|---|---|
STT_LITELLM_URL |
http://litellm-ext:4000/v1/chat/completions |
endpoint LiteLLM (via Service Endpoints) |
STT_LITELLM_KEY |
lm-studio |
clé LiteLLM (valeur exacte attendue) |
STT_MODEL |
hermes-default |
alias LiteLLM (bascule Qwen/Claude via hermes-switch) |
STT_SYSTEM_PROMPT |
prompt vocal FR concis | persona |
STT_MAX_TOKENS / STT_TEMPERATURE |
200 / 0.7 |
génération |
Dev local
cd stt/server
pip install -e .
STT_LITELLM_URL=http://192.168.1.200:4000/v1/chat/completions stt-server # :8000
curl -s localhost:8000/healthz
curl -s localhost:8000/v1/ask -H 'content-type: application/json' -d '{"text":"bonjour"}'
Déploiement
- Image construite/poussée par
.github/workflows/build-stt-server.yml→ghcr.io/alkatrazz24/funk-stt-server. - Manifests :
k8s/apps/stt/; Application ArgoCD :k8s/apps-of-apps/apps/stt.yaml(depuismain). - Accès LiteLLM (hors cluster) : Service + Endpoints
litellm-ext→192.168.10.1:4000.
À venir
- Intégration des outils Hermes (« agir sur Funk ») via le gateway
:8080— nécessite de spécifier son API. Aujourd'hui : inférence/chat seulement (via LiteLLM). - Mémoire centralisée : Qdrant (s01) + distillation versionnée (
server/memory/). - Sessions multi-clients + historique.