Session security already comes from a cryptographically random 256-bit token (secrets.token_urlsafe) hashed before storage — SESSION_SECRET was required config that nothing ever read.
26 lines
722 B
Python
26 lines
722 B
Python
from pydantic_settings import BaseSettings, SettingsConfigDict
|
|
|
|
|
|
class Settings(BaseSettings):
|
|
model_config = SettingsConfigDict(env_file=".env", extra="ignore")
|
|
|
|
database_url: str
|
|
ollama_base_url: str
|
|
port: int = 7777
|
|
|
|
# LLM tiers — CPU-only remote Ollama, so the fast tier must stay small.
|
|
ollama_fast_model: str = "granite4.1:3b"
|
|
ollama_chat_model: str = "minicpm-v4.5:latest"
|
|
llm_max_concurrency: int = 2
|
|
llm_max_queue_depth: int = 8
|
|
llm_cooldown_seconds: float = 8.0 # min gap between ambient whispers
|
|
|
|
# TTS
|
|
piper_voices_dir: str = "voices"
|
|
|
|
# Where synthesized utterance audio is written (served at /audio/).
|
|
data_dir: str = "data"
|
|
|
|
|
|
settings = Settings()
|