mirror of
https://github.com/Alkatrazz24/Funk-lab.git
synced 2026-07-10 16:14:42 +02:00
feat(stt): mode texte + sélection de modèle (client→serveur par requête)
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). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013FmcxGsyXZXogiAHQLjnZT
This commit is contained in:
parent
47936b0088
commit
bfe7b7deca
10 changed files with 146 additions and 25 deletions
|
|
@ -12,9 +12,9 @@ import httpx
|
|||
from stt_server.config import settings
|
||||
|
||||
|
||||
async def ask(text: str) -> str:
|
||||
async def ask(text: str, model: str | None = None) -> str:
|
||||
payload = {
|
||||
"model": settings.model,
|
||||
"model": model or settings.model,
|
||||
"messages": [
|
||||
{"role": "system", "content": settings.system_prompt},
|
||||
{"role": "user", "content": text},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue