Usage Metadata
Usage metadata about response(s).
Properties
Functions
Link copied to clipboard
Instantiates a builder for UsageMetadata.
Link copied to clipboard
Number of tokens in the cached part of the prompt (the cached content).
Link copied to clipboard
List of modalities that were processed in the cache input.
Link copied to clipboard
Deserializes a JSON string to a UsageMetadata object.
Link copied to clipboard
@InternalApi()
Deserializes a JsonNode to an object of the given type.
Link copied to clipboard
@InternalApi()
Deserializes a Json string to an object of the given type.
Link copied to clipboard
Link copied to clipboard
Number of tokens in the prompt.
Link copied to clipboard
List of modalities that were processed in the request input.
Link copied to clipboard
Total number of tokens across all the generated response candidates.
Link copied to clipboard
List of modalities that were returned in the response.
Link copied to clipboard
Overrides the default maximum JSON string length (20MB) for the JSON parser.
Link copied to clipboard
Converts a Json string to a JsonNode.
Link copied to clipboard
Number of tokens of thoughts for thinking models.
Link copied to clipboard
Creates a builder with the same values as this instance.
Link copied to clipboard
Serializes an object to a JsonNode.
Link copied to clipboard
Serializes an object to a Json string.
Link copied to clipboard
Number of tokens present in tool-use prompt(s).
Link copied to clipboard
List of modalities that were processed in the tool-use prompt.
Link copied to clipboard
Total token count for prompt, response candidates, and tool-use prompts(if present).
Link copied to clipboard
Traffic type.