Ask a question to get started
Enter to sendā¢Shift+Enter new line
from_function( cls, func: Callable | None, name: str, description: str
func
Callable | None
The function to create the tool from.
name
str
The name of the tool.
description
The description of the tool.
return_direct
bool
False
args_schema
ArgsSchema | None
None
coroutine
Callable[..., Awaitable[Any]] | None
**kwargs
Any
{}
Initialize tool from a function.
Whether to return the output directly.
The schema of the tool's input arguments.
The asynchronous version of the function.
Additional arguments to pass to the tool.