Class CallableFunctionDeclaration (1.71.0)

CallableFunctionDeclaration(
    name: str,
    function: typing.Callable[[...], typing.Any],
    parameters: typing.Dict[str, typing.Any],
    description: typing.Optional[str] = None,
)

A function declaration plus a function.

Methods

CallableFunctionDeclaration

CallableFunctionDeclaration(
    name: str,
    function: typing.Callable[[...], typing.Any],
    parameters: typing.Dict[str, typing.Any],
    description: typing.Optional[str] = None,
)

Constructs a FunctionDeclaration.

from_func

from_func(
    func: typing.Callable[[...], typing.Any]
) -> vertexai.generative_models._generative_models.CallableFunctionDeclaration

Automatically creates a CallableFunctionDeclaration from a Python function.

The function parameter schema is automatically extracted.