renamed flows to aiflows
Browse files
LCToolFlow.py
CHANGED
@@ -5,7 +5,7 @@ from typing import Any, Dict
|
|
5 |
import hydra
|
6 |
from langchain.tools import BaseTool
|
7 |
|
8 |
-
from
|
9 |
|
10 |
|
11 |
class LCToolFlow(AtomicFlow):
|
@@ -31,7 +31,7 @@ class LCToolFlow(AtomicFlow):
|
|
31 |
|
32 |
:param backend: The backend of the flow. It is a tool that is run by the flow. (e.g. duckduckgo search engine)
|
33 |
:type backend: BaseTool
|
34 |
-
:param \**kwargs: Additional arguments to pass to the flow. See :class:`
|
35 |
"""
|
36 |
|
37 |
REQUIRED_KEYS_CONFIG = ["backend"]
|
|
|
5 |
import hydra
|
6 |
from langchain.tools import BaseTool
|
7 |
|
8 |
+
from aiflows.base_flows import AtomicFlow
|
9 |
|
10 |
|
11 |
class LCToolFlow(AtomicFlow):
|
|
|
31 |
|
32 |
:param backend: The backend of the flow. It is a tool that is run by the flow. (e.g. duckduckgo search engine)
|
33 |
:type backend: BaseTool
|
34 |
+
:param \**kwargs: Additional arguments to pass to the flow. See :class:`aiflows.base_flows.AtomicFlow` for more details.
|
35 |
"""
|
36 |
|
37 |
REQUIRED_KEYS_CONFIG = ["backend"]
|
README.md
CHANGED
@@ -44,7 +44,7 @@ Default: "useful when you need to look for the answer online, especially for rec
|
|
44 |
**Arguments**:
|
45 |
|
46 |
- `backend` (`BaseTool`): The backend of the flow. It is a tool that is run by the flow. (e.g. duckduckgo search engine)
|
47 |
-
- `\**kwargs`: Additional arguments to pass to the flow. See :class:`
|
48 |
|
49 |
<a id="LCToolFlow.LCToolFlow.instantiate_from_config"></a>
|
50 |
|
|
|
44 |
**Arguments**:
|
45 |
|
46 |
- `backend` (`BaseTool`): The backend of the flow. It is a tool that is run by the flow. (e.g. duckduckgo search engine)
|
47 |
+
- `\**kwargs`: Additional arguments to pass to the flow. See :class:`aiflows.base_flows.AtomicFlow` for more details.
|
48 |
|
49 |
<a id="LCToolFlow.LCToolFlow.instantiate_from_config"></a>
|
50 |
|
demo.yaml
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
flow:
|
2 |
-
_target_: aiflows.LCToolFlowModule.LCToolFlow.instantiate_from_default_config
|
3 |
name: "demoLCToolFlow"
|
4 |
description: "An example flow that uses the LCToolFlowModule."
|
|
|
1 |
flow:
|
2 |
+
_target_: flow_modules.aiflows.LCToolFlowModule.LCToolFlow.instantiate_from_default_config
|
3 |
name: "demoLCToolFlow"
|
4 |
description: "An example flow that uses the LCToolFlowModule."
|
run.py
CHANGED
@@ -4,12 +4,12 @@ import os
|
|
4 |
|
5 |
import hydra
|
6 |
|
7 |
-
import
|
8 |
-
from
|
9 |
-
from
|
10 |
|
11 |
-
from
|
12 |
-
from
|
13 |
|
14 |
CACHING_PARAMETERS.do_caching = False # Set to True to enable caching
|
15 |
# clear_cache() # Uncomment this line to clear the cache
|
@@ -19,7 +19,7 @@ logging.set_verbosity_debug()
|
|
19 |
dependencies = [
|
20 |
{"url": "aiflows/LCToolFlowModule", "revision": os.getcwd()},
|
21 |
]
|
22 |
-
from
|
23 |
flow_verse.sync_dependencies(dependencies)
|
24 |
|
25 |
if __name__ == "__main__":
|
|
|
4 |
|
5 |
import hydra
|
6 |
|
7 |
+
import aiflows
|
8 |
+
from aiflows.flow_launchers import FlowLauncher
|
9 |
+
from aiflows.utils.general_helpers import read_yaml_file
|
10 |
|
11 |
+
from aiflows import logging
|
12 |
+
from aiflows.flow_cache import CACHING_PARAMETERS, clear_cache
|
13 |
|
14 |
CACHING_PARAMETERS.do_caching = False # Set to True to enable caching
|
15 |
# clear_cache() # Uncomment this line to clear the cache
|
|
|
19 |
dependencies = [
|
20 |
{"url": "aiflows/LCToolFlowModule", "revision": os.getcwd()},
|
21 |
]
|
22 |
+
from aiflows import flow_verse
|
23 |
flow_verse.sync_dependencies(dependencies)
|
24 |
|
25 |
if __name__ == "__main__":
|