Clean Versions
Browse files
run.py
CHANGED
|
@@ -55,25 +55,21 @@ if __name__ == "__main__":
|
|
| 55 |
|
| 56 |
#3. ~~~~ Serve The Flow ~~~~
|
| 57 |
serve_utils.serve_flow(
|
| 58 |
-
cl
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
default_state=None,
|
| 62 |
-
default_dispatch_point="coflows_dispatch"
|
| 63 |
)
|
| 64 |
-
|
| 65 |
#4. ~~~~~Start A Worker Thread~~~~~
|
| 66 |
-
run_dispatch_worker_thread(cl
|
| 67 |
|
| 68 |
#5. ~~~~~Mount the flow and get its proxy~~~~~~
|
| 69 |
-
proxy_flow
|
| 70 |
cl=cl,
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
config_overrides=
|
| 74 |
-
|
| 75 |
-
dispatch_point_override=None,
|
| 76 |
-
)
|
| 77 |
|
| 78 |
|
| 79 |
#6. ~~~ Get the data ~~~
|
|
|
|
| 55 |
|
| 56 |
#3. ~~~~ Serve The Flow ~~~~
|
| 57 |
serve_utils.serve_flow(
|
| 58 |
+
cl=cl,
|
| 59 |
+
flow_class_name="flow_modules.aiflows.ChatFlowModule.ChatAtomicFlow",
|
| 60 |
+
flow_endpoint="ChatAtomicFlow",
|
|
|
|
|
|
|
| 61 |
)
|
| 62 |
+
|
| 63 |
#4. ~~~~~Start A Worker Thread~~~~~
|
| 64 |
+
run_dispatch_worker_thread(cl)
|
| 65 |
|
| 66 |
#5. ~~~~~Mount the flow and get its proxy~~~~~~
|
| 67 |
+
proxy_flow= serve_utils.get_flow_instance(
|
| 68 |
cl=cl,
|
| 69 |
+
flow_endpoint="ChatAtomicFlow",
|
| 70 |
+
user_id="local",
|
| 71 |
+
config_overrides= cfg
|
| 72 |
+
)
|
|
|
|
|
|
|
| 73 |
|
| 74 |
|
| 75 |
#6. ~~~ Get the data ~~~
|