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" # Canonical public origin, used for absolute URLs that must be correct # for machines rather than browsers: sitemap entries, the # robots.txt Sitemap line, and rel=canonical. Cannot be derived from the # request — behind the Cloudflare Tunnel the app sees an internal host, # and advertising that to a crawler would publish unreachable URLs. public_base_url: str = "https://spirit.thetempleofdoom.com" settings = Settings()