From f4b48aae69ef538046eee1e0830dbad905752dc9 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 17 Mar 2026 10:22:16 +0700 Subject: [PATCH] =?UTF-8?q?fix:=20PDF-Crash=20bei=20Nicht-Flugtickets=20?= =?UTF-8?q?=E2=80=94=20=5Fcheck=5Fflight=5Fplausibility=20gab=20leeren=20S?= =?UTF-8?q?tring=20statt=20Tuple?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- homelab-ai-bot/telegram_bot.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/homelab-ai-bot/telegram_bot.py b/homelab-ai-bot/telegram_bot.py index b72c2029..b227a7d6 100644 --- a/homelab-ai-bot/telegram_bot.py +++ b/homelab-ai-bot/telegram_bot.py @@ -469,7 +469,7 @@ async def handle_photo(update: Update, ctx: ContextTypes.DEFAULT_TYPE): 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. Parst Datum/Uhrzeit-Paare aus der strukturierten Antwort und flaggt @@ -512,7 +512,7 @@ def _check_flight_plausibility(text: str) -> str: current_seg = {} if len(segments) < 2: - return "" + return "", [] warnings = [] year = 2026