Starting April 29, 2025, Gemini 1.5 Pro and Gemini 1.5 Flash models are not available in projects that have no prior usage of these models, including new projects. For details, see Model versions and lifecycle.
Stay organized with collections
Save and categorize content based on your preferences.
Structured representation of a function declaration as defined by the [OpenAPI 3.0 specification](https://spec.openapis.org/oas/v3.0.3). Included in this declaration are the function name and parameters. This FunctionDeclaration is a representation of a block of code that can be used as a Tool by the model and executed by the client.
Optional. Description and purpose of the function. Model uses it to decide how and whether to call the function.
name
name:string;
The name of the function to call. Must start with a letter or an underscore. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a max length of 64.
parameters
parameters?:FunctionDeclarationSchema;
Optional. Describes the parameters to this function in JSON Schema Object format. Reflects the Open API 3.03 Parameter Object. string Key: the name of the parameter. Parameter names are case sensitive. Schema Value: the Schema defining the type used for the parameter. For function with no parameters, this can be left unset.
Example
with 1 required and 1 optional parameter: type: OBJECT properties:
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-28 UTC."],[],[],null,["# Interface FunctionDeclaration (1.9.0)\n\nStructured representation of a function declaration as defined by the \\[OpenAPI 3.0 specification\\](\u003chttps://spec.openapis.org/oas/v3.0.3\u003e). Included in this declaration are the function name and parameters. This FunctionDeclaration is a representation of a block of code that can be used as a Tool by the model and executed by the client.\n\nPackage\n-------\n\n[@google-cloud/vertexai](../overview.html)\n\nProperties\n----------\n\n### description\n\n description?: string;\n\nOptional. Description and purpose of the function. Model uses it to decide how and whether to call the function.\n\n### name\n\n name: string;\n\nThe name of the function to call. Must start with a letter or an underscore. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a max length of 64.\n\n### parameters\n\n parameters?: FunctionDeclarationSchema;\n\nOptional. Describes the parameters to this function in JSON Schema Object format. Reflects the Open API 3.03 Parameter Object. string Key: the name of the parameter. Parameter names are case sensitive. Schema Value: the Schema defining the type used for the parameter. For function with no parameters, this can be left unset.\n**Example**\n\nwith 1 required and 1 optional parameter: type: OBJECT properties: \n\n\n param1:\n\n type: STRING\n param2:\n\n type: INTEGER\n required:\n\n - param1"]]