changed naming of messaging methods
Browse filesFiles changed (4)
135 unmodified lines136137138139140141142143144135 unmodified linesresponse = json.loads(api_output)reply = self._package_output_message(input_message=input_message,response=response)self.reply_to_message(reply = reply, to = input_message)135 unmodified lines136137138139140141142143144145135 unmodified linesresponse = json.loads(api_output)reply = self.package_output_message(input_message=input_message,response=response)self.send_message(reply, is_reply = True)
88 unmodified lines899091929394959697989923 unmodified lines12312412512612712812913013113213313413513613713813914014114214314414588 unmodified linesdef generate_reply(self):""" This method generates the reply of the flow. It's called when the flow is finished. """reply = self._package_output_message(input_message = self.flow_state["input_message"],response = self.reply_interface(self.flow_state))self.reply_to_message(reply,to=self.flow_state["input_message"])def get_next_flow_to_call(self):23 unmodified lineselse:input_interface = self.input_interface_controllermessage = self._package_input_message(data = input_interface(self.flow_state),dst_flow = "Controller")self.subflows["Controller"].send_message_async(message, pipe_to= self.flow_config["flow_ref"])def call_executor(self):#call executorexecutor_branch_to_call = self.flow_state["command"]message = self._package_input_message(data = self.flow_state["command_args"],dst_flow = executor_branch_to_call)self.subflows[executor_branch_to_call].send_message_async(message, pipe_to= self.flow_config["flow_ref"])def register_data_to_state(self, input_message):88 unmodified lines899091929394959697989923 unmodified lines12312412512612712812913013113213313413513613713813914014114214314414514614714814915015188 unmodified linesdef generate_reply(self):""" This method generates the reply of the flow. It's called when the flow is finished. """reply = self.package_output_message(input_message = self.flow_state["input_message"],response = self.reply_interface(self.flow_state))self.send_message(reply,is_reply = True)def get_next_flow_to_call(self):23 unmodified lineselse:input_interface = self.input_interface_controllermessage = self.package_input_message(data = input_interface(self.flow_state),dst_flow = "Controller")self.subflows["Controller"].get_reply(message,self.get_instance_id(),)def call_executor(self):#call executorexecutor_branch_to_call = self.flow_state["command"]message = self.package_input_message(data = self.flow_state["command_args"],dst_flow = executor_branch_to_call)self.subflows[executor_branch_to_call].get_reply(message,self.get_instance_id(),)def register_data_to_state(self, input_message):
68 unmodified lines69707172737475767768 unmodified lines# Log the update to the flow messages listobservation = search_response["wiki_content"] if search_response["wiki_content"] else search_response["relevant_pages"]reply = self._package_output_message(input_message = input_message,response = {"wiki_content": observation},)self.reply_to_message(reply=reply, to=input_message)68 unmodified lines69707172737475767768 unmodified lines# Log the update to the flow messages listobservation = search_response["wiki_content"] if search_response["wiki_content"] else search_response["relevant_pages"]reply = self.package_output_message(input_message = input_message,response = {"wiki_content": observation},)self.send_message(reply, is_reply = True)
92 unmodified lines9394959697989910010110292 unmodified lines)#option2: use the proxy_flow#input_message = proxy_flow._package_input_message(data = data)#7. ~~~ Run inference ~~~future = proxy_flow.send_message_blocking(input_message)#uncomment this line if you would like to get the full message back#reply_message = future.get_message()92 unmodified lines9394959697989910010110292 unmodified lines)#option2: use the proxy_flow#input_message = proxy_flow.package_input_message(data = data)#7. ~~~ Run inference ~~~future = proxy_flow.get_reply_future(input_message)#uncomment this line if you would like to get the full message back#reply_message = future.get_message()
ControllerAtomicFlow.py+3-2
ControllerExecutorFlow.py+12-6
WikiSearchAtomicFlow.py+2-2
run.py+2-2