Package com.google.genai.types
Class FunctionCall
java.lang.Object
com.google.genai.JsonSerializable
com.google.genai.types.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.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from class com.google.genai.JsonSerializable
MAX_READ_LENGTH_PROPERTY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionargs()Optional.static FunctionCall.Builderbuilder()Instantiates a builder for FunctionCall.static FunctionCallDeserializes a JSON string to a FunctionCall object.id()Optional.name()Optional.abstract Optional<List<PartialArg>>Optional.abstract FunctionCall.BuilderCreates a builder with the same values as this instance.Optional.Methods inherited from class com.google.genai.JsonSerializable
fromJsonNode, fromJsonString, objectMapper, setMaxReadLength, stringToJsonNode, toJson, toJsonNode, toJsonString
-
Constructor Details
-
FunctionCall
public FunctionCall()
-
-
Method Details
-
id
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`. -
args
Optional. The function parameters and values in JSON object format. See FunctionDeclaration.parameters for parameter details. -
name
Optional. The name of the function to call. Matches FunctionDeclaration.name. -
partialArgs
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
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. -
builder
Instantiates a builder for FunctionCall. -
toBuilder
Creates a builder with the same values as this instance. -
fromJson
Deserializes a JSON string to a FunctionCall object.
-