diff --git a/workers/executor/executors/answer_prompt.py b/workers/executor/executors/answer_prompt.py index 89936fe59..c22c8aaaf 100644 --- a/workers/executor/executors/answer_prompt.py +++ b/workers/executor/executors/answer_prompt.py @@ -333,7 +333,7 @@ def handle_json( return parsed_data = repair_json_with_best_structure(answer) - if isinstance(parsed_data, str): + if not isinstance(parsed_data, (dict, list)): logger.error("Error parsing response to JSON") structured_output[prompt_key] = {} return