Tachi67 commited on
Commit
7889716
·
1 Parent(s): 268376c

Update CodeWriterFlow.py

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