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.



11178
11179
11180
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 11178

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

Instance Attribute Details

#candidates_token_countFixnum

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

Returns:

  • (Fixnum)


11166
11167
11168
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 11166

def candidates_token_count
  @candidates_token_count
end

#prompt_token_countFixnum

Number of tokens in the request. Corresponds to the JSON property promptTokenCount

Returns:

  • (Fixnum)


11171
11172
11173
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 11171

def prompt_token_count
  @prompt_token_count
end

#total_token_countFixnum

Corresponds to the JSON property totalTokenCount

Returns:

  • (Fixnum)


11176
11177
11178
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 11176

def total_token_count
  @total_token_count
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



11183
11184
11185
11186
11187
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 11183

def update!(**args)
  @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