Interface FunctionCall

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.

interface FunctionCall {
    args?: Record<string, unknown>;
    id?: string;
    name?: string;
    partialArgs?: PartialArg[];
    willContinue?: boolean;
}

Properties

args?: Record<string, unknown>

Optional. The function parameters and values in JSON object format. See FunctionDeclaration.parameters for parameter details.

id?: string

Optional. The unique id of the function call. If populated, the client to execute the function_call and return the response with the matching id.

name?: string

Optional. The name of the function to call. Matches FunctionDeclaration.name.

partialArgs?: PartialArg[]

Optional. The partial argument value of the function call. If provided, represents the arguments/fields that are streamed incrementally. This field is not supported in Gemini API.

willContinue?: boolean

Optional. Whether this is the last part of the FunctionCall. If true, another partial message for the current FunctionCall is expected to follow. This field is not supported in Gemini API.