diff --git a/pilot/scene/chat_execution/out_parser.py b/pilot/scene/chat_execution/out_parser.py index 6f67bde38..44f203d1e 100644 --- a/pilot/scene/chat_execution/out_parser.py +++ b/pilot/scene/chat_execution/out_parser.py @@ -21,6 +21,8 @@ class PluginChatOutputParser(BaseOutputParser): def parse_prompt_response(self, model_out_text) -> T: clean_json_str = super().parse_prompt_response(model_out_text) print(clean_json_str) + if not clean_json_str: + raise ValueError("model server response not have json!") try: response = json.loads(clean_json_str) except Exception as e: