ouput single round is dict
Browse files71 unmodified lines7273747576777879806 unmodified lines8788899091929394959697989910010110210310410510610771 unmodified lines"status": "unfinished"})def _single_round_controller_executor(self, executor_reply: Dict[str,Any]) -> Dict[str,Any]:controller_reply = self.ask_subflow("Controller", executor_reply).get_data()if controller_reply["command"] == "finish":return {6 unmodified lines"observation": self.ask_subflow(controller_reply["command"], controller_reply["command_args"]).get_data()}return controller_reply, executor_replydef run(self,input_data):executor_reply = input_datafor round in range(self.flow_config["max_rounds"]):_ , executor_reply = self._single_round_controller_executor(executor_reply)if executor_reply.get("EARLY_EXIT",False):return executor_replyself._on_reach_max_round()return {"EARLY_EXIT": False,"answer": executor_reply["observation"],"status": "unfinished"}71 unmodified lines72737475767778798081826 unmodified lines899091929394959697989910010110210310410510610710810911011111211311411571 unmodified lines"status": "unfinished"})def _single_round_controller_executor(self, reply: Dict[str,Any]) -> Dict[str,Any]:in_data = reply["executor_reply"]controller_reply = self.ask_subflow("Controller", in_data).get_data()if controller_reply["command"] == "finish":return {6 unmodified lines"observation": self.ask_subflow(controller_reply["command"], controller_reply["command_args"]).get_data()}return {"controller_reply": controller_reply,"executor_reply": executor_reply}def run(self,input_data):reply = {"executor_reply": input_data,"controller_reply": None}for round in range(self.flow_config["max_rounds"]):reply = self._single_round_controller_executor(reply)if reply.get("EARLY_EXIT",False):return replyself._on_reach_max_round()return {"EARLY_EXIT": False,"answer": reply["executor_reply"]["observation"],"status": "unfinished"}
ControllerExecutorFlow.py+16-8