Reference documentation and code samples for the Vertex AI V1 API class Google::Cloud::AIPlatform::V1::GenerateContentResponse::UsageMetadata.
Usage metadata about response(s).
Inherits
- Object
Extended By
- Google::Protobuf::MessageExts::ClassMethods
Includes
- Google::Protobuf::MessageExts
Methods
#cache_tokens_details
def cache_tokens_details() -> ::Array<::Google::Cloud::AIPlatform::V1::ModalityTokenCount>
Returns
- (::Array<::Google::Cloud::AIPlatform::V1::ModalityTokenCount>) — Output only. List of modalities of the cached content in the request input.
#cached_content_token_count
def cached_content_token_count() -> ::Integer
Returns
- (::Integer) — Output only. Number of tokens in the cached part in the input (the cached content).
#candidates_token_count
def candidates_token_count() -> ::Integer
Returns
- (::Integer) — Number of tokens in the response(s).
#candidates_token_count=
def candidates_token_count=(value) -> ::Integer
Parameter
- value (::Integer) — Number of tokens in the response(s).
Returns
- (::Integer) — Number of tokens in the response(s).
#candidates_tokens_details
def candidates_tokens_details() -> ::Array<::Google::Cloud::AIPlatform::V1::ModalityTokenCount>
Returns
- (::Array<::Google::Cloud::AIPlatform::V1::ModalityTokenCount>) — Output only. List of modalities that were returned in the response.
#prompt_token_count
def prompt_token_count() -> ::Integer
Returns
-
(::Integer) — 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.
#prompt_token_count=
def prompt_token_count=(value) -> ::Integer
Parameter
-
value (::Integer) — 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.
Returns
-
(::Integer) — 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.
#prompt_tokens_details
def prompt_tokens_details() -> ::Array<::Google::Cloud::AIPlatform::V1::ModalityTokenCount>
Returns
- (::Array<::Google::Cloud::AIPlatform::V1::ModalityTokenCount>) — Output only. List of modalities that were processed in the request input.
#thoughts_token_count
def thoughts_token_count() -> ::Integer
Returns
- (::Integer) — Output only. Number of tokens present in thoughts output.
#total_token_count
def total_token_count() -> ::Integer
Returns
- (::Integer) — Total token count for prompt and response candidates.
#total_token_count=
def total_token_count=(value) -> ::Integer
Parameter
- value (::Integer) — Total token count for prompt and response candidates.
Returns
- (::Integer) — Total token count for prompt and response candidates.