Package com.google.genai.types
Class FunctionResponse
java.lang.Object
com.google.genai.JsonSerializable
com.google.genai.types.FunctionResponse
A function response.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder for FunctionResponse. -
Field Summary
Fields inherited from class com.google.genai.JsonSerializable
objectMapper -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic FunctionResponse.Builderbuilder()Instantiates a builder for FunctionResponse.static FunctionResponseDeserializes a JSON string to a FunctionResponse object.id()The id of the function call this response is for.name()Required.response()Required.abstract FunctionResponse.BuilderCreates a builder with the same values as this instance.Methods inherited from class com.google.genai.JsonSerializable
fromJsonNode, fromJsonString, toJson, toJsonNode, toJsonString
-
Constructor Details
-
FunctionResponse
public FunctionResponse()
-
-
Method Details
-
id
The id of the function call this response is for. Populated by the client to match the corresponding function call `id`. -
name
Required. The name of the function to call. Matches [FunctionDeclaration.name] and [FunctionCall.name]. -
response
Required. The function response in JSON object format. Use "output" key to specify function output and "error" key to specify error details (if any). If "output" and "error" keys are not specified, then whole "response" is treated as function output. -
builder
Instantiates a builder for FunctionResponse. -
toBuilder
Creates a builder with the same values as this instance. -
fromJson
Deserializes a JSON string to a FunctionResponse object.
-