Update ControllerFlow_ExtLib.py
Browse files112 unmodified lines113114115116117118119120112 unmodified lineswhile True:api_output = super().run(input_data)["api_output"].strip()try:response = json.loads(api_output)return responseexcept (json.decoder.JSONDecodeError, json.JSONDecodeError):updated_system_message_content = self._get_message(self.system_message_prompt_template, input_data)self._state_update_add_chat_message(content=updated_system_message_content,112 unmodified lines113114115116117118119120121122112 unmodified lineswhile True:api_output = super().run(input_data)["api_output"].strip()try:start = api_output.index("{")end = api_output.rindex("}") + 1json_str = api_output[start:end]return json.loads(json_str)except (json.decoder.JSONDecodeError, json.JSONDecodeError):updated_system_message_content = self._get_message(self.system_message_prompt_template, input_data)self._state_update_add_chat_message(content=updated_system_message_content,
ControllerFlow_ExtLib.py+4-2