nbaldwin commited on
Commit
901ba01
1 Parent(s): e511f35

changed naming of messaging methods

Browse files
Files changed (2) hide show
  1. AutoGPTFlow.py +9 -13
  2. run.py +2 -2
AutoGPTFlow.py CHANGED
@@ -174,39 +174,39 @@ class AutoGPTFlow(ControllerExecutorFlow):
174
  def call_memory_read(self):
175
  memory_read_input = self.prepare_memory_read_input()
176
 
177
- message = self._package_input_message(
178
  data = memory_read_input,
179
  dst_flow = "Memory",
180
  )
181
 
182
- self.subflows["Memory"].send_message_async(
183
  message,
184
- pipe_to = self.flow_config["flow_ref"]
185
  )
186
 
187
  def call_memory_write(self):
188
  memory_write_input = self.prepare_memory_write_input()
189
 
190
- message = self._package_input_message(
191
  data = memory_write_input,
192
  dst_flow = "Memory",
193
  )
194
 
195
- self.subflows["Memory"].send_message_async(
196
  message,
197
- pipe_to = self.flow_config["flow_ref"]
198
  )
199
 
200
  def call_human_feedback(self):
201
 
202
- message = self._package_input_message(
203
  data = self.input_interface_human_feedback(self.flow_state),
204
  dst_flow = "HumanFeedback",
205
  )
206
 
207
- self.subflows["HumanFeedback"].send_message_async(
208
  message,
209
- pipe_to = self.flow_config["flow_ref"]
210
  )
211
 
212
  def register_data_to_state(self, input_message):
@@ -269,10 +269,6 @@ class AutoGPTFlow(ControllerExecutorFlow):
269
 
270
  self.flow_state["early_exit_flag"] = True
271
 
272
-
273
-
274
-
275
-
276
  def run(self,input_message):
277
 
278
  self.register_data_to_state(input_message)
 
174
  def call_memory_read(self):
175
  memory_read_input = self.prepare_memory_read_input()
176
 
177
+ message = self.package_input_message(
178
  data = memory_read_input,
179
  dst_flow = "Memory",
180
  )
181
 
182
+ self.subflows["Memory"].get_reply(
183
  message,
184
+ self.get_instance_id(),
185
  )
186
 
187
  def call_memory_write(self):
188
  memory_write_input = self.prepare_memory_write_input()
189
 
190
+ message = self.package_input_message(
191
  data = memory_write_input,
192
  dst_flow = "Memory",
193
  )
194
 
195
+ self.subflows["Memory"].get_reply(
196
  message,
197
+ self.get_instance_id(),
198
  )
199
 
200
  def call_human_feedback(self):
201
 
202
+ message = self.package_input_message(
203
  data = self.input_interface_human_feedback(self.flow_state),
204
  dst_flow = "HumanFeedback",
205
  )
206
 
207
+ self.subflows["HumanFeedback"].get_reply(
208
  message,
209
+ self.get_instance_id(),
210
  )
211
 
212
  def register_data_to_state(self, input_message):
 
269
 
270
  self.flow_state["early_exit_flag"] = True
271
 
 
 
 
 
272
  def run(self,input_message):
273
 
274
  self.register_data_to_state(input_message)
run.py CHANGED
@@ -94,10 +94,10 @@ if __name__ == "__main__":
94
  )
95
 
96
  #option2: use the proxy_flow
97
- #input_message = proxy_flow._package_input_message(data = data)
98
 
99
  #7. ~~~ Run inference ~~~
100
- future = proxy_flow.send_message_blocking(input_message)
101
 
102
  #uncomment this line if you would like to get the full message back
103
  #reply_message = future.get_message()
 
94
  )
95
 
96
  #option2: use the proxy_flow
97
+ #input_message = proxy_flow.package_input_message(data = data)
98
 
99
  #7. ~~~ Run inference ~~~
100
+ future = proxy_flow.get_reply_future(input_message)
101
 
102
  #uncomment this line if you would like to get the full message back
103
  #reply_message = future.get_message()