google.generativeai.types.CallableFunctionDeclaration

An extension of FunctionDeclaration that can be built from a python function, and is callable.

Inherits From: FunctionDeclaration

description

name

parameters

Methods

from_function

View source

Builds a CallableFunctionDeclaration from a python function.

The function should have type annotations.

This method is able to generate the schema for arguments annotated with types:

AllowedTypes = float | int | str | list[AllowedTypes] | dict

This method does not yet build a schema for TypedDict, that would allow you to specify the dictionary contents. But you can build these manually.

from_proto

View source

to_proto

View source

__call__

View source

Call self as a function.