Update Controller_CoderFlow.py
Browse files117 unmodified lines118119120121122123124117 unmodified linesresponse = json.loads(api_output)return responseexcept (json.decoder.JSONDecodeError, json.JSONDecodeError):new_goal = "The previous respond cannot be parsed with json.loads. Make sure your next response is in JSON format."new_input_data = input_data.copy()new_input_data['result'] = new_goalinput_data = new_input_data117 unmodified lines118119120121122123124125126127117 unmodified linesresponse = 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,role=self.flow_config["system_name"])new_goal = "The previous respond cannot be parsed with json.loads. Next time, do not provide any comments or code blocks. Make sure your next response is purely json parsable."new_input_data = input_data.copy()new_input_data['result'] = new_goalinput_data = new_input_data
Controller_CoderFlow.py+4-1