fix: increase voice PDF context to 40k chars, fix language detection sanity

- Voice context per-document limit 10k→40k chars (was cutting off at page 6)
- Language detection: reject results >30 chars (LLM returning sentences)
- Voice.py: generalize "PDF" label to "Dokumente"

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Christian Gick
2026-02-23 12:40:13 +02:00
parent 751bfbd164
commit e81aa79396
2 changed files with 3 additions and 2 deletions

View File

@@ -700,7 +700,7 @@ class VoiceSession:
instructions = _build_voice_prompt(model=self.model, timezone=user_timezone) + memory_section
if self._document_context:
instructions += f"\n\nDokument-Kontext (PDF im Raum hochgeladen):\n{self._document_context}"
instructions += f"\n\nDokument-Kontext (im Raum hochgeladen):\n{self._document_context}"
agent = _NoiseFilterAgent(
instructions=instructions,
tools=[search_web, set_user_timezone],