diff --git a/fjerkroa_bot/ai_responder.py b/fjerkroa_bot/ai_responder.py index 2f496ae..0cf44d2 100644 --- a/fjerkroa_bot/ai_responder.py +++ b/fjerkroa_bot/ai_responder.py @@ -47,7 +47,10 @@ def parse_maybe_json(json_string): concatenated_values.append(str(value)) return '\n'.join(concatenated_values) - return str(parsed_json) + result = str(parsed_json) + if result.lower() in ('', 'none', 'null', '"none"', '"null"', "'none'", "'null'"): + return None + return result class AIMessageBase(object):