Getting ready for merge
Browse filesFiles changed (2)
- ChatHumanFlowModule.py+5-2
- run.py+1-8
60 unmodified lines61626364656639 unmodified lines10610710810911011111211360 unmodified linesadditional_transformations = [self.regex_extractor, self.end_of_interaction])def set_up_flow_state(self):""" This method sets up the flow state. It is called when the flow is executed."""super().set_up_flow_state()39 unmodified lines:param input_message: The input message to the flow.:type input_message: FlowMessage"""self.flow_state["assistant_outputs"].append(input_message.data["api_output"])message = self.package_input_message(data=input_message.data)if self.max_rounds_reached():self.generate_reply()60 unmodified lines616263646566676839 unmodified lines10810911011111211311411511660 unmodified linesadditional_transformations = [self.regex_extractor, self.end_of_interaction])self.input_interface_user = KeyInterface()def set_up_flow_state(self):""" This method sets up the flow state. It is called when the flow is executed."""super().set_up_flow_state()39 unmodified lines:param input_message: The input message to the flow.:type input_message: FlowMessage"""msg = self.input_interface_user(input_message)###I ADDED THISself.flow_state["assistant_outputs"].append(msg.data["api_output"])###Imessage = self.package_input_message(data=msg.data)if self.max_rounds_reached():self.generate_reply()
30 unmodified lines3132333435363740 unmodified lines7879808182838485868788899030 unmodified linesif __name__ == "__main__":#1. ~~~~~ Set up a colink server ~~~~FLOW_MODULES_PATH = "./"cl = start_colink_server()40 unmodified linesdata = {"id": 0, "query": "I want to ask you a few questions"} # This can be a list of samples# data = {"id": 0, "question": "Who was the NBA champion in 2023?"} # This can be a list of samples#option1: use the FlowMessage classinput_message = FlowMessage(data=data,)#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)30 unmodified lines31323334353640 unmodified lines7778798081828330 unmodified linesif __name__ == "__main__":#1. ~~~~~ Set up a colink server ~~~~cl = start_colink_server()40 unmodified linesdata = {"id": 0, "query": "I want to ask you a few questions"} # This can be a list of samples# data = {"id": 0, "question": "Who was the NBA champion in 2023?"} # This can be a list of samplesinput_message = proxy_flow.package_input_message(data = data)#7. ~~~ Run inference ~~~future = proxy_flow.get_reply_future(input_message)
ChatHumanFlowModule.py+5-2
run.py+1-8