Package com.google.genai.types
Class ComputeTokensResponse
java.lang.Object
com.google.genai.JsonSerializable
com.google.genai.types.ComputeTokensResponse
Response for computing tokens.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Builder for ComputeTokensResponse. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
Instantiates a builder for ComputeTokensResponse.static ComputeTokensResponse
Deserializes a JSON string to a ComputeTokensResponse object.abstract Optional<HttpResponse>
Used to retain the full HTTP response.abstract ComputeTokensResponse.Builder
Creates a builder with the same values as this instance.abstract Optional<List<TokensInfo>>
Lists of tokens info from the input.Methods inherited from class com.google.genai.JsonSerializable
stringToJsonNode, toJson
-
Constructor Details
-
ComputeTokensResponse
public ComputeTokensResponse()
-
-
Method Details
-
sdkHttpResponse
Used to retain the full HTTP response. -
tokensInfo
Lists of tokens info from the input. A ComputeTokensRequest could have multiple instances with a prompt in each instance. We also need to return lists of tokens info for the request with multiple instances. -
builder
Instantiates a builder for ComputeTokensResponse. -
toBuilder
Creates a builder with the same values as this instance. -
fromJson
Deserializes a JSON string to a ComputeTokensResponse object.
-