loop fix
Browse files104 unmodified lines10510610710810911011168 unmodified lines18018118218318418518618718818919019122 unmodified lines214215216217218104 unmodified linesdef _on_reach_max_round(self):""" This method is called when the flow reaches the maximum amount of rounds. It updates the state of the flow and starts the process of terminating the flow."""self._state_update_dict({"EARLY_EXIT": False,"answer": "The maximum amount of rounds was reached before the model found an answer.","status": "unfinished"})68 unmodified linesself._state_update_dict({"EARLY_EXIT": True,"answer": self.flow_state["command_args"]["answer"],"status": "finished"})self.flow_state["early_exit_flag"] = True22 unmodified linesself._on_reach_max_round()self.generate_reply()self.flow_state["last_state"] = current_state104 unmodified lines10510610710810911068 unmodified lines17918018118218318418518618718818919022 unmodified lines213214215216217218219220221104 unmodified linesdef _on_reach_max_round(self):""" This method is called when the flow reaches the maximum amount of rounds. It updates the state of the flow and starts the process of terminating the flow."""self._state_update_dict({"answer": "The maximum amount of rounds was reached before the model found an answer.","status": "unfinished"})68 unmodified linesself._state_update_dict({"early_exit_flag": True,"answer": self.flow_state["command_args"]["answer"],"status": "finished"})22 unmodified linesself._on_reach_max_round()self.generate_reply()if self.flow_state.get("early_exit_flag",False) or current_state is None:self.flow_state["last_state"] = Noneelse:self.flow_state["last_state"] = current_state
ControllerExecutorFlow.py+7-4