MCPcopy Create free account
hub / github.com/Louisym/MiniCC / __init__

Method __init__

tutorials/18_design_patterns_for_agents.py:636–637  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

634 对应 Rust: BTreeMap<String, Box<dyn FnMut(&str) -> Result<String, ToolError>>>
635 """
636 def __init__(self):
637 self._handlers: dict[str, Callable[[str], str]] = {}
638
639 def register(self, name: str, handler: Callable[[str], str]):
640 """注册一个工具: 名字 → 处理函数"""

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected