mirror of
https://github.com/Alkatrazz24/Funk-lab.git
synced 2026-07-08 17:04:42 +02:00
Serveur : /v1/ask accepte un model optionnel (validé contre STT_ALLOWED_MODELS), nouvel endpoint GET /v1/models (défaut + alias autorisés). Pas de switch global. Client : 'stt --text' (chat texte simple sans micro/HUD), '--model hermes|claude|qwen|opus' (noms courts → alias LiteLLM), commandes /model et /models en mode texte. Le modèle choisi est envoyé au serveur à chaque requête (voix comme texte). Claude-Session: https://claude.ai/code/session_013FmcxGsyXZXogiAHQLjnZT Co-authored-by: Claude <noreply@anthropic.com>
2.1 KiB
2.1 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} |
GET |
/v1/models |
— | {default, available[]} |
POST |
/v1/ask |
{text, model?} |
{reply, model} |
model (optionnel) = alias LiteLLM ; défaut serveur si absent ; rejeté (400) si absent
de STT_ALLOWED_MODELS. Le client choisit le modèle par requête (pas de switch global).
Configuration (variables d'env)
| Var | Défaut | Rôle |
|---|---|---|
STT_LITELLM_URL |
http://192.168.10.1:4000/v1/chat/completions |
endpoint LiteLLM (IP directe s01, cf. open-webui) |
STT_LITELLM_KEY |
lm-studio |
clé LiteLLM (valeur exacte attendue) |
STT_MODEL |
hermes-default |
modèle par défaut |
STT_ALLOWED_MODELS |
hermes-default,qwen3-8b,claude-sonnet-4-6,claude-opus-4-7 |
alias autorisés (demandables par le client) |
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) : IP directe
192.168.10.1:4000(même pattern qu'open-webui).
À 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.