Funk-lab/stt/server/stt_server/config.py
Claude ed387d9a3a
fix(stt): joindre LiteLLM en IP directe (192.168.10.1:4000)
L'indirection litellm-ext (Service sans sélecteur + Endpoints manuel) ne routait pas
('All connection attempts failed'). open-webui joint LiteLLM en IP directe — on copie
ce pattern éprouvé et on supprime litellm-external.yaml.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013FmcxGsyXZXogiAHQLjnZT
2026-06-17 11:17:06 +00:00

27 lines
950 B
Python

"""Configuration du STT-server — via variables d'environnement (12-factor / k8s)."""
from __future__ import annotations
import os
class Settings:
# LiteLLM (s01) — joint en IP directe depuis le cluster (cf. open-webui).
litellm_url: str = os.getenv(
"STT_LITELLM_URL", "http://192.168.10.1:4000/v1/chat/completions"
)
litellm_key: str = os.getenv("STT_LITELLM_KEY", "lm-studio")
model: str = os.getenv("STT_MODEL", "hermes-default")
system_prompt: str = os.getenv(
"STT_SYSTEM_PROMPT",
"Tu es Hermes, l'assistant vocal du homelab Funk. "
"Réponds toujours en français, de façon concise (2-3 phrases maximum), "
"sans markdown ni listes.",
)
max_tokens: int = int(os.getenv("STT_MAX_TOKENS", "200"))
temperature: float = float(os.getenv("STT_TEMPERATURE", "0.7"))
request_timeout: float = float(os.getenv("STT_REQUEST_TIMEOUT", "60"))
settings = Settings()