Emulate tool execution using LLM if tool should be emulated.
wrap_tool_call(
self,
request: ToolCallRequest,
handler: Callable[[ToolCallRequest], ToolMessage | Command[Any]]
) -> ToolMessage | Command[Any]| Name | Type | Description |
|---|---|---|
request* | ToolCallRequest | Tool call request to potentially emulate. |
handler* | Callable[[ToolCallRequest], ToolMessage | Command[Any]] | Callback to execute the tool (can be called multiple times). |