nbaldwin commited on
Commit
fa853aa
·
1 Parent(s): d741bf4
Files changed (1) hide show
  1. run.py +4 -4
run.py CHANGED
@@ -9,7 +9,7 @@ from aiflows.utils.general_helpers import read_yaml_file, quick_load_api_keys
9
  from aiflows import logging
10
  from aiflows.flow_cache import CACHING_PARAMETERS, clear_cache
11
 
12
- from aiflows.utils import serve_utils
13
  from aiflows.workers import run_dispatch_worker_thread
14
  from aiflows.messages import FlowMessage
15
  from aiflows.interfaces import KeyInterface
@@ -55,7 +55,7 @@ if __name__ == "__main__":
55
 
56
 
57
  #3. ~~~~ Serve The Flow ~~~~
58
- serve_utils.recursive_serve_flow(
59
  cl=cl,
60
  flow_class_name="flow_modules.aiflows.ChatInteractiveFlowModule.ChatHumanFlowModule",
61
  flow_endpoint="ChatHumanFlowModule",
@@ -66,7 +66,7 @@ if __name__ == "__main__":
66
  run_dispatch_worker_thread(cl)
67
 
68
  #5. ~~~~~Mount the flow and get its proxy~~~~~~
69
- proxy_flow= serve_utils.get_flow_instance(
70
  cl=cl,
71
  flow_endpoint="ChatHumanFlowModule",
72
  user_id="local",
@@ -99,5 +99,5 @@ if __name__ == "__main__":
99
 
100
 
101
  #9. ~~~~~Optional: Unserve Flow~~~~~~
102
- # serve_utils.delete_served_flow(cl, "ChatWithDemonstrationFlowModule") o_caching = False # Set to True to enable caching
103
 
 
9
  from aiflows import logging
10
  from aiflows.flow_cache import CACHING_PARAMETERS, clear_cache
11
 
12
+ from aiflows.utils import serving
13
  from aiflows.workers import run_dispatch_worker_thread
14
  from aiflows.messages import FlowMessage
15
  from aiflows.interfaces import KeyInterface
 
55
 
56
 
57
  #3. ~~~~ Serve The Flow ~~~~
58
+ serving.recursive_serve_flow(
59
  cl=cl,
60
  flow_class_name="flow_modules.aiflows.ChatInteractiveFlowModule.ChatHumanFlowModule",
61
  flow_endpoint="ChatHumanFlowModule",
 
66
  run_dispatch_worker_thread(cl)
67
 
68
  #5. ~~~~~Mount the flow and get its proxy~~~~~~
69
+ proxy_flow= serving.get_flow_instance(
70
  cl=cl,
71
  flow_endpoint="ChatHumanFlowModule",
72
  user_id="local",
 
99
 
100
 
101
  #9. ~~~~~Optional: Unserve Flow~~~~~~
102
+ # serving.delete_served_flow(cl, "ChatWithDemonstrationFlowModule") o_caching = False # Set to True to enable caching
103