Update run_ExtendLibrary.py
Browse files- run_ExtendLibrary.py +8 -13
run_ExtendLibrary.py
CHANGED
|
@@ -2,12 +2,13 @@ import os
|
|
| 2 |
|
| 3 |
import hydra
|
| 4 |
|
| 5 |
-
from
|
| 6 |
-
from
|
| 7 |
-
from
|
| 8 |
|
| 9 |
-
from
|
| 10 |
-
from
|
|
|
|
| 11 |
|
| 12 |
CACHING_PARAMETERS.do_caching = False # Set to True in order to disable caching
|
| 13 |
# clear_cache() # Uncomment this line to clear the cache
|
|
@@ -26,7 +27,7 @@ dependencies = [
|
|
| 26 |
{"url": "Tachi67/CodeWriterFlowModule", "revision": "main"},
|
| 27 |
]
|
| 28 |
|
| 29 |
-
from
|
| 30 |
|
| 31 |
flow_verse.sync_dependencies(dependencies)
|
| 32 |
|
|
@@ -40,13 +41,7 @@ if __name__ == "__main__":
|
|
| 40 |
cfg_path = os.path.join(current_dir, "ExtendLibraryFlow.yaml")
|
| 41 |
cfg = read_yaml_file(cfg_path)
|
| 42 |
# ~~~ setting api information into config ~~~
|
| 43 |
-
cfg
|
| 44 |
-
cfg["subflows_config"]["Planner"]["subflows_config"]["Executor"]["subflows_config"]["write_plan"]["subflows_config"]["PlanGenerator"]["backend"]["api_infos"] = api_information
|
| 45 |
-
cfg["subflows_config"]["CtrlExMem"]["subflows_config"]["Controller"]["backend"]["api_infos"] = api_information
|
| 46 |
-
cfg["subflows_config"]["CtrlExMem"]["subflows_config"]["Executor"]["subflows_config"]["write_code"]["subflows_config"]["Controller"]["backend"]["api_infos"] = api_information
|
| 47 |
-
cfg["subflows_config"]["CtrlExMem"]["subflows_config"]["Executor"]["subflows_config"]["write_code"]["subflows_config"]["Executor"]["subflows_config"]["write_code"]["subflows_config"]["CodeGenerator"]["backend"]["api_infos"] = api_information
|
| 48 |
-
cfg["subflows_config"]["CtrlExMem"]["subflows_config"]["Executor"]["subflows_config"]["re_plan"]["subflows_config"]["Controller"]["backend"]["api_infos"] = api_information
|
| 49 |
-
cfg["subflows_config"]["CtrlExMem"]["subflows_config"]["Executor"]["subflows_config"]["re_plan"]["subflows_config"]["Executor"]["subflows_config"]["write_plan"]["subflows_config"]["PlanGenerator"]["backend"]["api_infos"] = api_information
|
| 50 |
|
| 51 |
# ~~~ setting memory files into config ~~~
|
| 52 |
code_lib_file_loc = os.path.join(current_dir, "library.py")
|
|
|
|
| 2 |
|
| 3 |
import hydra
|
| 4 |
|
| 5 |
+
from aiflows.backends.api_info import ApiInfo
|
| 6 |
+
from aiflows.messages import InputMessage
|
| 7 |
+
from aiflows.utils.general_helpers import read_yaml_file
|
| 8 |
|
| 9 |
+
from aiflows import logging
|
| 10 |
+
from aiflows.flow_cache import CACHING_PARAMETERS, clear_cache
|
| 11 |
+
from aiflows.utils.general_helpers import update_api_infos
|
| 12 |
|
| 13 |
CACHING_PARAMETERS.do_caching = False # Set to True in order to disable caching
|
| 14 |
# clear_cache() # Uncomment this line to clear the cache
|
|
|
|
| 27 |
{"url": "Tachi67/CodeWriterFlowModule", "revision": "main"},
|
| 28 |
]
|
| 29 |
|
| 30 |
+
from aiflows import flow_verse
|
| 31 |
|
| 32 |
flow_verse.sync_dependencies(dependencies)
|
| 33 |
|
|
|
|
| 41 |
cfg_path = os.path.join(current_dir, "ExtendLibraryFlow.yaml")
|
| 42 |
cfg = read_yaml_file(cfg_path)
|
| 43 |
# ~~~ setting api information into config ~~~
|
| 44 |
+
update_api_infos(cfg, api_information)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 45 |
|
| 46 |
# ~~~ setting memory files into config ~~~
|
| 47 |
code_lib_file_loc = os.path.join(current_dir, "library.py")
|