feat: schedule_hours-Backstop, zentrale Datum/Uhrzeit, Filler-Timing
1) schedule_hours-Nudge: search_backstop erkennt jetzt auch Oeffnungszeiten,
"hat X geoeffnet", Notdienst und Fahrplaene/naechste Abfahrt (de/en/nl/fr) und
erzwingt dafuer die Suche. +6 Offline-Tests.
2) Zentrale Datum-/Uhrzeit-Auskunft (app/core/clock.py, now_context()): jedes
Modul kann das aktuelle Datum + Uhrzeit (lokale TZ, Wochentag) erfragen.
In die System-Prompts aller antwortenden LLMs injiziert (ToolCallingLLM,
OpenRouter, lokal) -> relative Zeitangaben ("heute", "morgen", "in 3 Stunden",
"naechsten Montag") werden aufgeloest. Live: "Welcher Wochentag/Datum?" ->
korrekt OHNE Web-Suche.
3) Filler-Timing: Mindestabstand 10 s zwischen Opening und Geduldssaetzen
(FILLER_PATIENCE_INTERVAL 4->10). Sobald die Antwort vorliegt, wird ein
anstehender Filler/Geduldssatz NICHT mehr ausgegeben (answer_started-Gate).
Tests: 318 gruen. Doc §5.4/§5.7/§8.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
48a79da12f
commit
b70d6f364a
9 changed files with 80 additions and 19 deletions
|
|
@ -42,6 +42,20 @@ _PATTERNS = [
|
|||
re.compile(r"\bstill\s+alive\b", re.I),
|
||||
re.compile(r"\b(?:encore|toujours)\s+(?:en\s+vie|vivant)\b", re.I),
|
||||
re.compile(r"\b(?:sigue|todav[íi]a)\b.{0,20}\bviv[oa]\b", re.I),
|
||||
|
||||
# Öffnungszeiten / „hat X geöffnet" (Gegenwart/Logistik)
|
||||
re.compile(r"\b(?:öffnungszeiten|opening hours|openingstijden|horaires? d.ouverture)\b", re.I),
|
||||
re.compile(r"\b(?:geöffnet|geschlossen)\b", re.I),
|
||||
re.compile(r"\bnoch\s+(?:offen|auf|geöffnet)\b", re.I),
|
||||
re.compile(r"\bis\b.{0,30}\bopen\b", re.I),
|
||||
re.compile(r"\b(?:geopend|open)\b.{0,12}\b(?:vandaag|nu)\b", re.I),
|
||||
re.compile(r"\bnotdienst\b", re.I),
|
||||
# Fahrpläne / nächste Abfahrt
|
||||
re.compile(r"\b(?:wann|wanneer|hoe laat|when|what time|à quelle heure)\b.{0,40}"
|
||||
r"\b(?:bus|z[üu]ge?|bahn|tram|s-?bahn|u-?bahn|train|trein|metro|f[äa]hre|veerboot|flug|flight)\b", re.I),
|
||||
re.compile(r"\b(?:nächste[rn]?|next|volgende|prochain\w*)\b.{0,15}"
|
||||
r"\b(?:bus|zug|bahn|train|trein|tram|f[äa]hre|metro)\b", re.I),
|
||||
re.compile(r"\b(?:abfahrt\w*|departure|vertrek\w*)\b", re.I),
|
||||
]
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue