MCPcopy Create free account
hub / github.com/InternLM/InternBootcamp / load_tools_config

Function load_tools_config

internbootcamp/utils/tool_server/utils.py:22–33  ·  view source on GitHub ↗

加载工具配置文件

(yaml_path: str)

Source from the content-addressed store, hash-verified

20
21
22def load_tools_config(yaml_path: str) -> List[Dict]:
23 """加载工具配置文件"""
24 try:
25 with open(yaml_path, 'r', encoding='utf-8') as f:
26 config = yaml.safe_load(f)
27
28 if 'tools' not in config:
29 raise ValueError("配置文件中没有找到'tools'字段")
30
31 return config['tools']
32 except Exception as e:
33 raise RuntimeError(f"加载配置文件失败: {e}")
34
35
36def get_external_ip() -> str:

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected