MCPcopy Create free account
hub / github.com/DVampire/FinAgent / _load_modules

Method _load_modules

finagent/asset/base.py:47–57  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

45 return asset_infos
46
47 def _load_modules(self)->Dict[str, BeautifulSoup]:
48 modules_dir_path = assemble_project_path("res/prompts/module")
49 modules = {}
50
51 modules_paths = glob(os.path.join(modules_dir_path, "**", "*.html"), recursive=True)
52 for module_path in modules_paths:
53 with open(module_path, "r") as f:
54 module = BeautifulSoup(f.read(), "html.parser")
55 name = os.path.basename(module_path).replace(".html", "")
56 modules[name] = module
57 return modules
58
59 def check_asset_info(self, symbol: str = None)-> bool:
60 return symbol in self.assets["asset_infos"]

Callers 1

_load_assetsMethod · 0.95

Calls 1

assemble_project_pathFunction · 0.90

Tested by

no test coverage detected