FunctionCall

@Serializable
data class FunctionCall(val id: String? = null, val args: Map<String, JsonElement>? = null, val name: String? = null, val partialArgs: List<PartialArg>? = null, val willContinue: Boolean? = null)

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.

Constructors

Link copied to clipboard
constructor(id: String? = null, args: Map<String, JsonElement>? = null, name: String? = null, partialArgs: List<PartialArg>? = null, willContinue: Boolean? = null)

Properties

Link copied to clipboard
val args: Map<String, JsonElement>? = null

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

Link copied to clipboard
val id: String? = null

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.

Link copied to clipboard
val name: String? = null

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

Link copied to clipboard

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.

Link copied to clipboard
val willContinue: Boolean? = null

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.