从 YAML 文件加载工具配置,构建 tools 和 tool_registry
(yaml_path: str)
| 170 | |
| 171 | |
| 172 | def load_yaml(yaml_path: str) -> Optional[Dict[str, Any]]: |
| 173 | """ |
| 174 | 从 YAML 文件加载工具配置,构建 tools 和 tool_registry |
| 175 | """ |
| 176 | with open(yaml_path, "r", encoding="utf-8") as f: |
| 177 | config = yaml.safe_load(f) |
| 178 | return config |
| 179 | |
| 180 | |
| 181 | def main(): |