FunctionCall interface
Stay organized with collections
Save and categorize content based on your preferences.
A predicted FunctionCall returned from the model that contains a string representing the FunctionDeclaration.name and a structured JSON object containing the parameters and their values.
Signature:
export interface FunctionCall
Properties
Property |
Type |
Description |
args |
object |
|
id |
string |
The id of the function call. This must be sent back in the associated FunctionResponse. |
name |
string |
|
FunctionCall.args
Signature:
args: object;
FunctionCall.id
The id of the function call. This must be sent back in the associated FunctionResponse.
This property is only supported in the Gemini Developer API (GoogleAIBackend). When using the Gemini Developer API (GoogleAIBackend), this property will be undefined
.
Signature:
id?: string;
FunctionCall.name
Signature:
name: string;
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-28 UTC.
[null,null,["Last updated 2025-08-28 UTC."],[],[],null,["A predicted [FunctionCall](./ai.functioncall.md#functioncall_interface) returned from the model that contains a string representing the [FunctionDeclaration.name](./ai.functiondeclaration.md#functiondeclarationname) and a structured JSON object containing the parameters and their values.\n\n**Signature:** \n\n export interface FunctionCall \n\nProperties\n\n| Property | Type | Description |\n|-----------------------------------------------|--------|------------------------------------------------------------------------------------------------------------------------------------------------|\n| [args](./ai.functioncall.md#functioncallargs) | object | |\n| [id](./ai.functioncall.md#functioncallid) | string | The id of the function call. This must be sent back in the associated [FunctionResponse](./ai.functionresponse.md#functionresponse_interface). |\n| [name](./ai.functioncall.md#functioncallname) | string | |\n\nFunctionCall.args\n\n**Signature:** \n\n args: object;\n\nFunctionCall.id\n\nThe id of the function call. This must be sent back in the associated [FunctionResponse](./ai.functionresponse.md#functionresponse_interface).\n\nThis property is only supported in the Gemini Developer API ([GoogleAIBackend](./ai.googleaibackend.md#googleaibackend_class)). When using the Gemini Developer API ([GoogleAIBackend](./ai.googleaibackend.md#googleaibackend_class)), this property will be `undefined`.\n\n**Signature:** \n\n id?: string;\n\nFunctionCall.name\n\n**Signature:** \n\n name: string;"]]