Class: Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1GenerateContentResponseUsageMetadata

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/aiplatform_v1beta1/classes.rb,
lib/google/apis/aiplatform_v1beta1/representations.rb,
lib/google/apis/aiplatform_v1beta1/representations.rb

Overview

Usage metadata about response(s).

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudAiplatformV1beta1GenerateContentResponseUsageMetadata

Returns a new instance of GoogleCloudAiplatformV1beta1GenerateContentResponseUsageMetadata.



12970
12971
12972
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 12970

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#cached_content_token_countFixnum

Output only. Number of tokens in the cached part in the input (the cached content). Corresponds to the JSON property cachedContentTokenCount

Returns:

  • (Fixnum)


12951
12952
12953
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 12951

def cached_content_token_count
  @cached_content_token_count
end

#candidates_token_countFixnum

Number of tokens in the response(s). Corresponds to the JSON property candidatesTokenCount

Returns:

  • (Fixnum)


12956
12957
12958
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 12956

def candidates_token_count
  @candidates_token_count
end

#prompt_token_countFixnum

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. Corresponds to the JSON property promptTokenCount

Returns:

  • (Fixnum)


12963
12964
12965
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 12963

def prompt_token_count
  @prompt_token_count
end

#total_token_countFixnum

Total token count for prompt and response candidates. Corresponds to the JSON property totalTokenCount

Returns:

  • (Fixnum)


12968
12969
12970
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 12968

def total_token_count
  @total_token_count
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



12975
12976
12977
12978
12979
12980
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 12975

def update!(**args)
  @cached_content_token_count = args[:cached_content_token_count] if args.key?(:cached_content_token_count)
  @candidates_token_count = args[:candidates_token_count] if args.key?(:candidates_token_count)
  @prompt_token_count = args[:prompt_token_count] if args.key?(:prompt_token_count)
  @total_token_count = args[:total_token_count] if args.key?(:total_token_count)
end