new version compatible
Browse files- HumanStandardInputFlow.py +1 -0
- 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 |
-
|
| 46 |
-
|
| 47 |
-
default_state=None,
|
| 48 |
-
default_dispatch_point="coflows_dispatch"
|
| 49 |
)
|
|
|
|
| 50 |
|
| 51 |
#4. ~~~~~Start A Worker Thread~~~~~
|
| 52 |
-
run_dispatch_worker_thread(cl
|
| 53 |
|
| 54 |
#5. ~~~~~Mount the flow and get its proxy~~~~~~
|
| 55 |
-
proxy_flow
|
| 56 |
cl=cl,
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
config_overrides=
|
| 60 |
-
|
| 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 ~~~
|