Class: Google::Apis::AiplatformV1::GoogleCloudAiplatformV1GenerateContentResponseUsageMetadata
- Inherits:
-
Object
- Object
- Google::Apis::AiplatformV1::GoogleCloudAiplatformV1GenerateContentResponseUsageMetadata
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/aiplatform_v1/classes.rb,
lib/google/apis/aiplatform_v1/representations.rb,
lib/google/apis/aiplatform_v1/representations.rb
Overview
Usage metadata about response(s).
Instance Attribute Summary collapse
-
#cache_tokens_details ⇒ Array<Google::Apis::AiplatformV1::GoogleCloudAiplatformV1ModalityTokenCount>
Output only.
-
#cached_content_token_count ⇒ Fixnum
Output only.
-
#candidates_token_count ⇒ Fixnum
Number of tokens in the response(s).
-
#candidates_tokens_details ⇒ Array<Google::Apis::AiplatformV1::GoogleCloudAiplatformV1ModalityTokenCount>
Output only.
-
#prompt_token_count ⇒ Fixnum
Number of tokens in the request.
-
#prompt_tokens_details ⇒ Array<Google::Apis::AiplatformV1::GoogleCloudAiplatformV1ModalityTokenCount>
Output only.
-
#thoughts_token_count ⇒ Fixnum
Output only.
-
#tool_use_prompt_token_count ⇒ Fixnum
Output only.
-
#tool_use_prompt_tokens_details ⇒ Array<Google::Apis::AiplatformV1::GoogleCloudAiplatformV1ModalityTokenCount>
Output only.
-
#total_token_count ⇒ Fixnum
Total token count for prompt, response candidates, and tool-use prompts (if present).
-
#traffic_type ⇒ String
Output only.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleCloudAiplatformV1GenerateContentResponseUsageMetadata
constructor
A new instance of GoogleCloudAiplatformV1GenerateContentResponseUsageMetadata.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleCloudAiplatformV1GenerateContentResponseUsageMetadata
Returns a new instance of GoogleCloudAiplatformV1GenerateContentResponseUsageMetadata.
12379 12380 12381 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 12379 def initialize(**args) update!(**args) end |
Instance Attribute Details
#cache_tokens_details ⇒ Array<Google::Apis::AiplatformV1::GoogleCloudAiplatformV1ModalityTokenCount>
Output only. List of modalities of the cached content in the request input.
Corresponds to the JSON property cacheTokensDetails
12321 12322 12323 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 12321 def cache_tokens_details @cache_tokens_details end |
#cached_content_token_count ⇒ Fixnum
Output only. Number of tokens in the cached part in the input (the cached
content).
Corresponds to the JSON property cachedContentTokenCount
12327 12328 12329 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 12327 def cached_content_token_count @cached_content_token_count end |
#candidates_token_count ⇒ Fixnum
Number of tokens in the response(s).
Corresponds to the JSON property candidatesTokenCount
12332 12333 12334 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 12332 def candidates_token_count @candidates_token_count end |
#candidates_tokens_details ⇒ Array<Google::Apis::AiplatformV1::GoogleCloudAiplatformV1ModalityTokenCount>
Output only. List of modalities that were returned in the response.
Corresponds to the JSON property candidatesTokensDetails
12337 12338 12339 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 12337 def candidates_tokens_details @candidates_tokens_details end |
#prompt_token_count ⇒ Fixnum
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
12344 12345 12346 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 12344 def prompt_token_count @prompt_token_count end |
#prompt_tokens_details ⇒ Array<Google::Apis::AiplatformV1::GoogleCloudAiplatformV1ModalityTokenCount>
Output only. List of modalities that were processed in the request input.
Corresponds to the JSON property promptTokensDetails
12349 12350 12351 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 12349 def prompt_tokens_details @prompt_tokens_details end |
#thoughts_token_count ⇒ Fixnum
Output only. Number of tokens present in thoughts output.
Corresponds to the JSON property thoughtsTokenCount
12354 12355 12356 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 12354 def thoughts_token_count @thoughts_token_count end |
#tool_use_prompt_token_count ⇒ Fixnum
Output only. Number of tokens present in tool-use prompt(s).
Corresponds to the JSON property toolUsePromptTokenCount
12359 12360 12361 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 12359 def tool_use_prompt_token_count @tool_use_prompt_token_count end |
#tool_use_prompt_tokens_details ⇒ Array<Google::Apis::AiplatformV1::GoogleCloudAiplatformV1ModalityTokenCount>
Output only. List of modalities that were processed for tool-use request
inputs.
Corresponds to the JSON property toolUsePromptTokensDetails
12365 12366 12367 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 12365 def tool_use_prompt_tokens_details @tool_use_prompt_tokens_details end |
#total_token_count ⇒ Fixnum
Total token count for prompt, response candidates, and tool-use prompts (if
present).
Corresponds to the JSON property totalTokenCount
12371 12372 12373 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 12371 def total_token_count @total_token_count end |
#traffic_type ⇒ String
Output only. Traffic type. This shows whether a request consumes Pay-As-You-Go
or Provisioned Throughput quota.
Corresponds to the JSON property trafficType
12377 12378 12379 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 12377 def traffic_type @traffic_type end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
12384 12385 12386 12387 12388 12389 12390 12391 12392 12393 12394 12395 12396 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 12384 def update!(**args) @cache_tokens_details = args[:cache_tokens_details] if args.key?(:cache_tokens_details) @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) @candidates_tokens_details = args[:candidates_tokens_details] if args.key?(:candidates_tokens_details) @prompt_token_count = args[:prompt_token_count] if args.key?(:prompt_token_count) @prompt_tokens_details = args[:prompt_tokens_details] if args.key?(:prompt_tokens_details) @thoughts_token_count = args[:thoughts_token_count] if args.key?(:thoughts_token_count) @tool_use_prompt_token_count = args[:tool_use_prompt_token_count] if args.key?(:tool_use_prompt_token_count) @tool_use_prompt_tokens_details = args[:tool_use_prompt_tokens_details] if args.key?(:tool_use_prompt_tokens_details) @total_token_count = args[:total_token_count] if args.key?(:total_token_count) @traffic_type = args[:traffic_type] if args.key?(:traffic_type) end |