Class FunctionCall
-
- All Implemented Interfaces:
public abstract class FunctionCall extends JsonSerializable
A function call.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public abstract classFunctionCall.BuilderBuilder for FunctionCall.
-
Field Summary
Fields Modifier and Type Field Description public final static StringMAX_READ_LENGTH_PROPERTY
-
Constructor Summary
Constructors Constructor Description FunctionCall()
-
Method Summary
Modifier and Type Method Description abstract Optional<String>id()The unique id of the function call. abstract Optional<Map<String, Object>>args()Optional. abstract Optional<String>name()Optional. abstract Optional<List<PartialArg>>partialArgs()Optional. abstract Optional<Boolean>willContinue()Optional. static FunctionCall.Builderbuilder()Instantiates a builder for FunctionCall. abstract FunctionCall.BuildertoBuilder()Creates a builder with the same values as this instance. static FunctionCallfromJson(String jsonString)Deserializes a JSON string to a FunctionCall object. -
Methods inherited from class com.google.genai.JsonSerializable
fromJsonNode, fromJsonString, objectMapper, setMaxReadLength, stringToJsonNode, toJson, toJsonNode, toJsonString -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
id
abstract Optional<String> id()
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
abstract Optional<Map<String, Object>> args()
Optional. The function parameters and values in JSON object format. See [FunctionDeclaration.parameters] for parameter details.
-
name
abstract Optional<String> name()
Optional. The name of the function to call. Matches [FunctionDeclaration.name].
-
partialArgs
abstract Optional<List<PartialArg>> 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
abstract Optional<Boolean> 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
static FunctionCall.Builder builder()
Instantiates a builder for FunctionCall.
-
toBuilder
abstract FunctionCall.Builder toBuilder()
Creates a builder with the same values as this instance.
-
fromJson
static FunctionCall fromJson(String jsonString)
Deserializes a JSON string to a FunctionCall object.
-
-
-
-