- WS /ws/session: modes, summon, anomaly fragments, streaming direct contact,
passive wire-ghost ambient loop, per-user rate limits, event transcript
- entities: anomaly-signature fingerprinting, LLM minting + procedural
fallback, Codex matching with contact counts and sightings
- tts: 8 local Piper voices (EN/ES), per-entity voice profiles, numpy
effects chain (pitch/rate/bitcrush/echo/static)
- llm: streaming client, submit_stream in bounded queue, SpiritService
with offline fallbacks for every channel
- routes: public /api/codex, /api/codex/{id}, /api/stats; /audio static mount
- models: Entity, EntitySighting, Event, ContactSession(entity_id, language)
27 lines
746 B
Python
27 lines
746 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
|
|
session_secret: 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()
|