Vertex AI V1 API - Class Google::Cloud::AIPlatform::V1::GenerateContentResponse::UsageMetadata (v0.56.0)

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

#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).

#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.

#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.