Class UsageMetadata (1.89.0)

UsageMetadata(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Usage metadata about response(s).

Attributes

Name Description
prompt_token_count int
Number of tokens in the request. When cached_content is set, this is still the total effective prompt size meaning this includes the number of tokens in the cached content.
candidates_token_count int
Number of tokens in the response(s).
total_token_count int
Total token count for prompt and response candidates.
cached_content_token_count int
Output only. Number of tokens in the cached part in the input (the cached content).
prompt_tokens_details MutableSequence[google.cloud.aiplatform_v1beta1.types.ModalityTokenCount]
Output only. List of modalities that were processed in the request input.
cache_tokens_details MutableSequence[google.cloud.aiplatform_v1beta1.types.ModalityTokenCount]
Output only. List of modalities of the cached content in the request input.
candidates_tokens_details MutableSequence[google.cloud.aiplatform_v1beta1.types.ModalityTokenCount]
Output only. List of modalities that were returned in the response.

Methods

UsageMetadata

UsageMetadata(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Usage metadata about response(s).