diff --git a/cheddahbot/scheduler.py b/cheddahbot/scheduler.py index 213c76f..9a72cbe 100644 --- a/cheddahbot/scheduler.py +++ b/cheddahbot/scheduler.py @@ -134,7 +134,7 @@ class Scheduler: timeout=15, ) resp.raise_for_status() - answer = resp.json()["choices"][0]["message"]["content"].strip() + answer = (resp.json()["choices"][0]["message"]["content"] or "").strip() result = "YES" in answer.upper() log.debug("LLM plural check: '%s' vs '%s' ->%s (%s)", a, b, result, answer) except Exception as e: