Class: Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1UsageMetadata
- Inherits:
-
Object
- Object
- Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1UsageMetadata
- 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 the content generation request and response. This message provides a detailed breakdown of token usage and other relevant metrics.
Instance Attribute Summary collapse
-
#cache_tokens_details ⇒ Array<Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1ModalityTokenCount>
Output only.
-
#cached_content_token_count ⇒ Fixnum
Output only.
-
#candidates_token_count ⇒ Fixnum
The total number of tokens in the generated candidates.
-
#candidates_tokens_details ⇒ Array<Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1ModalityTokenCount>
Output only.
-
#prompt_token_count ⇒ Fixnum
The total number of tokens in the prompt.
-
#prompt_tokens_details ⇒ Array<Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1ModalityTokenCount>
Output only.
-
#thoughts_token_count ⇒ Fixnum
Output only.
-
#tool_use_prompt_token_count ⇒ Fixnum
Output only.
-
#tool_use_prompt_tokens_details ⇒ Array<Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1ModalityTokenCount>
Output only.
-
#total_token_count ⇒ Fixnum
The total number of tokens for the entire request.
-
#traffic_type ⇒ String
Output only.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleCloudAiplatformV1beta1UsageMetadata
constructor
A new instance of GoogleCloudAiplatformV1beta1UsageMetadata.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleCloudAiplatformV1beta1UsageMetadata
Returns a new instance of GoogleCloudAiplatformV1beta1UsageMetadata.
64199 64200 64201 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 64199 def initialize(**args) update!(**args) end |
Instance Attribute Details
#cache_tokens_details ⇒ Array<Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1ModalityTokenCount>
Output only. A detailed breakdown of the token count for each modality in the
cached content.
Corresponds to the JSON property cacheTokensDetails
64137 64138 64139 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 64137 def cache_tokens_details @cache_tokens_details end |
#cached_content_token_count ⇒ Fixnum
Output only. The number of tokens in the cached content that was used for this
request.
Corresponds to the JSON property cachedContentTokenCount
64143 64144 64145 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 64143 def cached_content_token_count @cached_content_token_count end |
#candidates_token_count ⇒ Fixnum
The total number of tokens in the generated candidates.
Corresponds to the JSON property candidatesTokenCount
64148 64149 64150 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 64148 def candidates_token_count @candidates_token_count end |
#candidates_tokens_details ⇒ Array<Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1ModalityTokenCount>
Output only. A detailed breakdown of the token count for each modality in the
generated candidates.
Corresponds to the JSON property candidatesTokensDetails
64154 64155 64156 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 64154 def candidates_tokens_details @candidates_tokens_details end |
#prompt_token_count ⇒ Fixnum
The total number of tokens in the prompt. This includes any text, images, or
other media provided in the request. When cached_content is set, this also
includes the number of tokens in the cached content.
Corresponds to the JSON property promptTokenCount
64161 64162 64163 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 64161 def prompt_token_count @prompt_token_count end |
#prompt_tokens_details ⇒ Array<Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1ModalityTokenCount>
Output only. A detailed breakdown of the token count for each modality in the
prompt.
Corresponds to the JSON property promptTokensDetails
64167 64168 64169 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 64167 def prompt_tokens_details @prompt_tokens_details end |
#thoughts_token_count ⇒ Fixnum
Output only. The number of tokens that were part of the model's generated "
thoughts" output, if applicable.
Corresponds to the JSON property thoughtsTokenCount
64173 64174 64175 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 64173 def thoughts_token_count @thoughts_token_count end |
#tool_use_prompt_token_count ⇒ Fixnum
Output only. The number of tokens in the results from tool executions, which
are provided back to the model as input, if applicable.
Corresponds to the JSON property toolUsePromptTokenCount
64179 64180 64181 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 64179 def tool_use_prompt_token_count @tool_use_prompt_token_count end |
#tool_use_prompt_tokens_details ⇒ Array<Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1ModalityTokenCount>
Output only. A detailed breakdown by modality of the token counts from the
results of tool executions, which are provided back to the model as input.
Corresponds to the JSON property toolUsePromptTokensDetails
64185 64186 64187 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 64185 def tool_use_prompt_tokens_details @tool_use_prompt_tokens_details end |
#total_token_count ⇒ Fixnum
The total number of tokens for the entire request. This is the sum of
prompt_token_count, candidates_token_count, tool_use_prompt_token_count,
and thoughts_token_count.
Corresponds to the JSON property totalTokenCount
64192 64193 64194 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 64192 def total_token_count @total_token_count end |
#traffic_type ⇒ String
Output only. The traffic type for this request.
Corresponds to the JSON property trafficType
64197 64198 64199 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 64197 def traffic_type @traffic_type end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
64204 64205 64206 64207 64208 64209 64210 64211 64212 64213 64214 64215 64216 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 64204 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 |