awrap_tool_call(
self,
request: ToolCallRequest,
handler: Callable[[ToolCallRequest], Awaitable[ToolMessage | Name | Type | Description |
|---|---|---|
request* | ToolCallRequest | The tool call request. |
handler* | Callable[[ToolCallRequest], Awaitable[ToolMessage | Command[Any]]] |
Async twin of wrap_tool_call.
Defined so the async path keeps executing tools asynchronously. With
only the sync wrapper present, ToolNode falls back to running the tool
through _execute_tool_sync.
Awaitable callable that executes the tool.