MCPcopy Create free account
hub / github.com/modelscope/ms-agent / __init__

Method __init__

projects/fin_research/tools/spec_loader.py:37–48  ·  view source on GitHub ↗
(self, config)

Source from the content-addressed store, hash-verified

35 SPEC_DIR = 'projects/fin_research/tools/specs'
36
37 def __init__(self, config):
38 super().__init__(config)
39 tools_cfg = getattr(config, 'tools',
40 None) if config is not None else None
41 spec_cfg = getattr(tools_cfg, 'spec_loader',
42 None) if tools_cfg is not None else None
43 self.exclude_func(spec_cfg)
44
45 configured_dir = getattr(spec_cfg, 'spec_dir',
46 None) if spec_cfg is not None else None
47 default_dir = os.path.join(os.getcwd(), self.SPEC_DIR)
48 self.spec_dir = configured_dir or default_dir
49
50 async def connect(self):
51 # Warn once if the directory cannot be found; still operate to allow deferred config

Callers

nothing calls this directly

Calls 1

exclude_funcMethod · 0.80

Tested by

no test coverage detected