MCPcopy
hub / github.com/OpenBMB/ChatDev / get_function_catalog

Function get_function_catalog

utils/function_catalog.py:116–122  ·  view source on GitHub ↗
(functions_dir: str | Path = FUNCTION_CALLING_DIR)

Source from the content-addressed store, hash-verified

114
115
116def get_function_catalog(functions_dir: str | Path = FUNCTION_CALLING_DIR) -> FunctionCatalog:
117 directory = Path(functions_dir).resolve()
118 catalog = _catalog_registry.get(directory)
119 if catalog is None:
120 catalog = FunctionCatalog(directory)
121 _catalog_registry[directory] = catalog
122 return catalog
123
124
125def _build_function_metadata(name: str, fn: Any, functions_dir: Path) -> FunctionMetadata:

Callers 6

list_local_toolsFunction · 0.90
create_local_toolFunction · 0.90
field_specsMethod · 0.90
field_specsMethod · 0.90
field_specsMethod · 0.90
from_dictMethod · 0.90

Calls 3

FunctionCatalogClass · 0.85
resolveMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected