MCPcopy Index your code
hub / github.com/OpenBMB/ChatDev / call_function

Method call_function

utils/function_manager.py:102–107  ·  view source on GitHub ↗

Call a function by name with given arguments.

(self, name: str, *args, **kwargs)

Source from the content-addressed store, hash-verified

100 return name in self.functions
101
102 def call_function(self, name: str, *args, **kwargs) -> Any:
103 """Call a function by name with given arguments."""
104 func = self.get_function(name)
105 if func is None:
106 raise ValueError(f"Function {name} not found")
107 return func(*args, **kwargs)
108
109 def list_functions(self) -> Dict[str, Callable]:
110 """List all available functions."""

Callers

nothing calls this directly

Calls 1

get_functionMethod · 0.95

Tested by

no test coverage detected