nbaldwin commited on
Commit
f35a5e5
·
1 Parent(s): 09be0e1

new version compatible

Browse files
Files changed (2) hide show
  1. HumanStandardInputFlow.py +1 -0
  2. run.py +9 -12
HumanStandardInputFlow.py CHANGED
@@ -53,6 +53,7 @@ class HumanStandardInputFlow(AtomicFlow):
53
  query_message_prompt_template: JinjaPrompt = None
54
 
55
  __default_flow_config = {
 
56
  "name": "HumanStandardInput",
57
  "end_of_input_string": "EOI",
58
  "description": "Reads input from the user's standard input.",
 
53
  query_message_prompt_template: JinjaPrompt = None
54
 
55
  __default_flow_config = {
56
+ "_target_": "flow_modules.aiflows.HumanStandardInputFlow.HumanStandardInputFlow.instantiate_from_config",
57
  "name": "HumanStandardInput",
58
  "end_of_input_string": "EOI",
59
  "description": "Reads input from the user's standard input.",
run.py CHANGED
@@ -42,24 +42,21 @@ if __name__ == "__main__":
42
  #3. ~~~~ Serve The Flow ~~~~
43
  serve_utils.serve_flow(
44
  cl = cl,
45
- flow_type="HumanStandardInputFlowModule",
46
- default_config=cfg,
47
- default_state=None,
48
- default_dispatch_point="coflows_dispatch"
49
  )
 
50
 
51
  #4. ~~~~~Start A Worker Thread~~~~~
52
- run_dispatch_worker_thread(cl, dispatch_point="coflows_dispatch", flow_modules_base_path=FLOW_MODULES_PATH)
53
 
54
  #5. ~~~~~Mount the flow and get its proxy~~~~~~
55
- proxy_flow = serve_utils.recursive_mount(
56
  cl=cl,
57
- client_id="local",
58
- flow_type="HumanStandardInputFlowModule",
59
- config_overrides=None,
60
- initial_state=None,
61
- dispatch_point_override=None,
62
- )
63
 
64
 
65
  #6. ~~~ Get the data ~~~
 
42
  #3. ~~~~ Serve The Flow ~~~~
43
  serve_utils.serve_flow(
44
  cl = cl,
45
+ flow_class_name="flow_modules.aiflows.HumanStandardInputFlowModule.HumanStandardInputFlow",
46
+ flow_endpoint="HumanStandardInputFlow",
 
 
47
  )
48
+
49
 
50
  #4. ~~~~~Start A Worker Thread~~~~~
51
+ run_dispatch_worker_thread(cl)
52
 
53
  #5. ~~~~~Mount the flow and get its proxy~~~~~~
54
+ proxy_flow= serve_utils.get_flow_instance(
55
  cl=cl,
56
+ flow_endpoint="HumanStandardInputFlow",
57
+ user_id="local",
58
+ config_overrides = cfg
59
+ )
 
 
60
 
61
 
62
  #6. ~~~ Get the data ~~~