Tachi67 commited on
Commit
0e7961d
·
1 Parent(s): f1e1910

Update PlanWriterFlow.py

Browse files
Files changed (1) hide show
  1. PlanWriterFlow.py +17 -1
PlanWriterFlow.py CHANGED
@@ -59,4 +59,20 @@ class PlanWriterFlow(ContentWriterFlow):
59
  output_payload["command_args"]["plan_file_location"] = plan_file_location
60
  return output_payload
61
  else:
62
- return output_payload
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
59
  output_payload["command_args"]["plan_file_location"] = plan_file_location
60
  return output_payload
61
  else:
62
+ return output_payload
63
+
64
+ def run(self, input_data: Dict[str, Any]) -> Dict[str, Any]:
65
+ # ~~~ sets the input_data in the flow_state dict ~~~
66
+ self._state_update_dict(update_data=input_data)
67
+
68
+ max_rounds = self.flow_config.get("max_rounds", 1)
69
+ if max_rounds is None:
70
+ log.info(f"Running {self.flow_config['name']} without `max_rounds` until the early exit condition is met.")
71
+
72
+ self._sequential_run(max_rounds=max_rounds)
73
+
74
+ output = self._get_output_from_state()
75
+
76
+ self.reset(full_reset=True, recursive=True, src_flow=self)
77
+
78
+ return output