fix(archivar): Timeouts auf 10s erhöht — empirisch ermittelt (Ø 2.4s, Cold-Start 7.8s)

This commit is contained in:
Bernd (Hermes)
2026-06-14 15:47:28 +02:00
parent 44121da702
commit 186308c983
+3 -3
View File
@@ -16,7 +16,7 @@ from typing import Dict
OLLAMA_CONFIG: dict = { OLLAMA_CONFIG: dict = {
"base_url": os.getenv("OLLAMA_BASE_URL", "http://localhost:11434"), "base_url": os.getenv("OLLAMA_BASE_URL", "http://localhost:11434"),
"model": "nomic-embed-text", "model": "nomic-embed-text",
"timeout": 5.0, # Sekunden — bei Überschreitung → Fallback "timeout": 10.0, # Sekunden — empirisch: Ø 2.4s, Cold-Start bis 7.8s
"embedding_dim": 768, # nomic-embed-text produziert 768-dimensionale Vektoren "embedding_dim": 768, # nomic-embed-text produziert 768-dimensionale Vektoren
} }
@@ -146,10 +146,10 @@ wird sie entsprechend klassifiziert. Alles andere → FAKT.
LLM_CONFIG = { LLM_CONFIG = {
"enabled": os.getenv("ARCHIVAR_ENABLE_LLM", "").strip().lower() in ("1", "true", "yes"), "enabled": os.getenv("ARCHIVAR_ENABLE_LLM", "").strip().lower() in ("1", "true", "yes"),
"model": "qwen2.5:7b", "model": "qwen2.5:7b",
"timeout": 5.0, "timeout": 10.0, # empirisch: Ø 2.4s, Cold-Start bis 7.8s, P95 2.6s
"base_url": "http://localhost:11434", "base_url": "http://localhost:11434",
"temperature": 0.0, "temperature": 0.0,
"max_tokens": 30, # Raum-ID (24 chars) + Whitespace-Puffer "max_tokens": 30, # Raum-ID = 24 chars + Puffer
} }
LLM_CLASSIFY_PROMPT = """Klassifiziere die folgende Nachricht in EINE Kategorie. LLM_CLASSIFY_PROMPT = """Klassifiziere die folgende Nachricht in EINE Kategorie.