ouput single round is dict
Browse files71 unmodified lines727374757576777877798081826 unmodified lines89909190929394959697989499100101102103104971051069910010710810911011111210511311411571 unmodified lines "status": "unfinished" }) def _single_round_controller_executor(self, executor_reply: Dict[str,Any]) -> Dict[str,Any]: def _single_round_controller_executor(self, reply: Dict[str,Any]) -> Dict[str,Any]: in_data = reply["executor_reply"] controller_reply = self.ask_subflow("Controller", executor_reply).get_data() 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, executor_reply return { "controller_reply": controller_reply, "executor_reply": executor_reply } def run(self,input_data):
executor_reply = input_data reply = { "executor_reply": input_data, "controller_reply": None } for round in range(self.flow_config["max_rounds"]): _ , executor_reply = self._single_round_controller_executor(executor_reply) reply = self._single_round_controller_executor(reply) if executor_reply.get("EARLY_EXIT",False): return executor_reply if reply.get("EARLY_EXIT",False): return reply self._on_reach_max_round() return { "EARLY_EXIT": False, "answer": executor_reply["observation"], "answer": reply["executor_reply"]["observation"], "status": "unfinished" }ControllerExecutorFlow.py+16-8