loop fix
Browse files104 unmodified lines10510610710810810911068 unmodified lines17918018118318218318418518618818718818919022 unmodified lines213214215216217218219217220221104 unmodified lines def _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 lines self._state_update_dict( { "EARLY_EXIT": True, "early_exit_flag": True, "answer": self.flow_state["command_args"]["answer"], "status": "finished" } ) self.flow_state["early_exit_flag"] = True 22 unmodified lines self._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"] = None else: self.flow_state["last_state"] = current_state self.flow_state["last_state"] = current_state ControllerExecutorFlow.py+7-4