feat(server): split runtime knobs out of .env into settings.toml
.env shrinks to bootstrap values only (port, paths, log, auth, deploy flags). The 14 admin-tunable values (retention, whisper, ollama, llm) move to a new settings.toml with serde(default)-based per-section defaults and an empty-prompt fallback to the code default. settings.toml is gitignored alongside .env; settings.toml.example is the template. This commit fixes the file layout. The server-side wiring (Config shrink, AppState integration, consumer migration) follows separately.
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
# Doctate runtime settings — admin-editable via WebUI.
|
||||
# Bootstrap values (port, data paths, log paths, auth) live in .env.
|
||||
# Copy to settings.toml and adjust per deployment.
|
||||
|
||||
[retention]
|
||||
audio_days = 30
|
||||
transcript_days = 30
|
||||
document_days = 0
|
||||
|
||||
[whisper]
|
||||
url = "http://localhost:9000"
|
||||
timeout_seconds = 120
|
||||
|
||||
[ollama]
|
||||
url = "http://localhost:11434"
|
||||
model = "gemma3:4b"
|
||||
keep_alive = 0
|
||||
|
||||
# LLM provider: swap url/api_key/model between blocks to switch providers.
|
||||
# Only one [llm] block may be active at a time — comment the others.
|
||||
|
||||
# Example: Ionos hosted
|
||||
[llm]
|
||||
url = "https://openai.inference.de-txl.ionos.com"
|
||||
api_key = ""
|
||||
model = ""
|
||||
temperature = 0
|
||||
timeout_seconds = 180
|
||||
# Single line or TOML triple-string for multi-line prompts.
|
||||
system_prompt = """
|
||||
Du bist ein medizinischer Assistent. Fasse die folgenden diktierten Abschnitte
|
||||
zu einem zusammenhängenden Text zusammen. Bereinigen und strukturieren, nichts
|
||||
hinzufügen, nichts interpretieren, keine Diagnose, keine Arztbrief-Struktur.
|
||||
Entferne Redundanzen. Spätere Aufnahmen haben Vorrang — Korrekturen, Nachträge
|
||||
und Widersprüche zugunsten der chronologisch letzten Aussage auflösen.
|
||||
Antworte auf Deutsch. Nur der zusammengefasste Text, keine Einleitung, kein
|
||||
Abschlusssatz.
|
||||
"""
|
||||
|
||||
# Example: Ollama local
|
||||
# [llm]
|
||||
# url = "http://localhost:11434"
|
||||
# api_key = ""
|
||||
# model = "SimonPu/gpt-oss:20b_Q4_K_M"
|
||||
# temperature = 0
|
||||
# timeout_seconds = 300
|
||||
Reference in New Issue
Block a user