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