fix: PDF-Crash bei Nicht-Flugtickets — _check_flight_plausibility gab leeren String statt Tuple
This commit is contained in:
parent
6f3b940674
commit
f4b48aae69
1 changed files with 2 additions and 2 deletions
|
|
@ -469,7 +469,7 @@ async def handle_photo(update: Update, ctx: ContextTypes.DEFAULT_TYPE):
|
||||||
await update.message.reply_text(f"Fehler bei Bildanalyse: {e}")
|
await update.message.reply_text(f"Fehler bei Bildanalyse: {e}")
|
||||||
|
|
||||||
|
|
||||||
def _check_flight_plausibility(text: str) -> str:
|
def _check_flight_plausibility(text: str) -> tuple[str, list]:
|
||||||
"""Prueft LLM-Antwort auf verdaechtige Layover-Zeiten zwischen Flugsegmenten.
|
"""Prueft LLM-Antwort auf verdaechtige Layover-Zeiten zwischen Flugsegmenten.
|
||||||
|
|
||||||
Parst Datum/Uhrzeit-Paare aus der strukturierten Antwort und flaggt
|
Parst Datum/Uhrzeit-Paare aus der strukturierten Antwort und flaggt
|
||||||
|
|
@ -512,7 +512,7 @@ def _check_flight_plausibility(text: str) -> str:
|
||||||
current_seg = {}
|
current_seg = {}
|
||||||
|
|
||||||
if len(segments) < 2:
|
if len(segments) < 2:
|
||||||
return ""
|
return "", []
|
||||||
|
|
||||||
warnings = []
|
warnings = []
|
||||||
year = 2026
|
year = 2026
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue