Class: Google::Apis::AiplatformV1beta1::GenaiVertexV1beta1InteractionUsage
- Inherits:
-
Object
- Object
- Google::Apis::AiplatformV1beta1::GenaiVertexV1beta1InteractionUsage
- 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
Statistics on the interaction request's token usage.
Instance Attribute Summary collapse
-
#cached_tokens_by_modality ⇒ Array<Google::Apis::AiplatformV1beta1::GenaiVertexV1beta1InteractionUsageModalityTokens>
A breakdown of cached token usage by modality.
-
#grounding_tool_count ⇒ Array<Google::Apis::AiplatformV1beta1::GenaiVertexV1beta1InteractionUsageGroundingToolCount>
Grounding tool count.
-
#input_tokens_by_modality ⇒ Array<Google::Apis::AiplatformV1beta1::GenaiVertexV1beta1InteractionUsageModalityTokens>
A breakdown of input token usage by modality.
-
#output_tokens_by_modality ⇒ Array<Google::Apis::AiplatformV1beta1::GenaiVertexV1beta1InteractionUsageModalityTokens>
A breakdown of output token usage by modality.
-
#tool_use_tokens_by_modality ⇒ Array<Google::Apis::AiplatformV1beta1::GenaiVertexV1beta1InteractionUsageModalityTokens>
A breakdown of tool-use token usage by modality.
-
#total_cached_tokens ⇒ Fixnum
Number of tokens in the cached part of the prompt (the cached content).
-
#total_input_tokens ⇒ Fixnum
Number of tokens in the prompt (context).
-
#total_output_tokens ⇒ Fixnum
Total number of tokens across all the generated responses.
-
#total_thought_tokens ⇒ Fixnum
Number of tokens of thoughts for thinking models.
-
#total_tokens ⇒ Fixnum
Total token count for the interaction request (prompt + responses + other internal tokens).
-
#total_tool_use_tokens ⇒ Fixnum
Number of tokens present in tool-use prompt(s).
Instance Method Summary collapse
-
#initialize(**args) ⇒ GenaiVertexV1beta1InteractionUsage
constructor
A new instance of GenaiVertexV1beta1InteractionUsage.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GenaiVertexV1beta1InteractionUsage
Returns a new instance of GenaiVertexV1beta1InteractionUsage.
4181 4182 4183 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 4181 def initialize(**args) update!(**args) end |
Instance Attribute Details
#cached_tokens_by_modality ⇒ Array<Google::Apis::AiplatformV1beta1::GenaiVertexV1beta1InteractionUsageModalityTokens>
A breakdown of cached token usage by modality.
Corresponds to the JSON property cachedTokensByModality
4128 4129 4130 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 4128 def cached_tokens_by_modality @cached_tokens_by_modality end |
#grounding_tool_count ⇒ Array<Google::Apis::AiplatformV1beta1::GenaiVertexV1beta1InteractionUsageGroundingToolCount>
Grounding tool count.
Corresponds to the JSON property groundingToolCount
4133 4134 4135 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 4133 def grounding_tool_count @grounding_tool_count end |
#input_tokens_by_modality ⇒ Array<Google::Apis::AiplatformV1beta1::GenaiVertexV1beta1InteractionUsageModalityTokens>
A breakdown of input token usage by modality.
Corresponds to the JSON property inputTokensByModality
4138 4139 4140 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 4138 def input_tokens_by_modality @input_tokens_by_modality end |
#output_tokens_by_modality ⇒ Array<Google::Apis::AiplatformV1beta1::GenaiVertexV1beta1InteractionUsageModalityTokens>
A breakdown of output token usage by modality.
Corresponds to the JSON property outputTokensByModality
4143 4144 4145 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 4143 def output_tokens_by_modality @output_tokens_by_modality end |
#tool_use_tokens_by_modality ⇒ Array<Google::Apis::AiplatformV1beta1::GenaiVertexV1beta1InteractionUsageModalityTokens>
A breakdown of tool-use token usage by modality.
Corresponds to the JSON property toolUseTokensByModality
4148 4149 4150 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 4148 def tool_use_tokens_by_modality @tool_use_tokens_by_modality end |
#total_cached_tokens ⇒ Fixnum
Number of tokens in the cached part of the prompt (the cached content).
Corresponds to the JSON property totalCachedTokens
4153 4154 4155 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 4153 def total_cached_tokens @total_cached_tokens end |
#total_input_tokens ⇒ Fixnum
Number of tokens in the prompt (context).
Corresponds to the JSON property totalInputTokens
4158 4159 4160 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 4158 def total_input_tokens @total_input_tokens end |
#total_output_tokens ⇒ Fixnum
Total number of tokens across all the generated responses.
Corresponds to the JSON property totalOutputTokens
4163 4164 4165 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 4163 def total_output_tokens @total_output_tokens end |
#total_thought_tokens ⇒ Fixnum
Number of tokens of thoughts for thinking models.
Corresponds to the JSON property totalThoughtTokens
4168 4169 4170 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 4168 def total_thought_tokens @total_thought_tokens end |
#total_tokens ⇒ Fixnum
Total token count for the interaction request (prompt + responses + other
internal tokens).
Corresponds to the JSON property totalTokens
4174 4175 4176 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 4174 def total_tokens @total_tokens end |
#total_tool_use_tokens ⇒ Fixnum
Number of tokens present in tool-use prompt(s).
Corresponds to the JSON property totalToolUseTokens
4179 4180 4181 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 4179 def total_tool_use_tokens @total_tool_use_tokens end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 4186 def update!(**args) @cached_tokens_by_modality = args[:cached_tokens_by_modality] if args.key?(:cached_tokens_by_modality) @grounding_tool_count = args[:grounding_tool_count] if args.key?(:grounding_tool_count) @input_tokens_by_modality = args[:input_tokens_by_modality] if args.key?(:input_tokens_by_modality) @output_tokens_by_modality = args[:output_tokens_by_modality] if args.key?(:output_tokens_by_modality) @tool_use_tokens_by_modality = args[:tool_use_tokens_by_modality] if args.key?(:tool_use_tokens_by_modality) @total_cached_tokens = args[:total_cached_tokens] if args.key?(:total_cached_tokens) @total_input_tokens = args[:total_input_tokens] if args.key?(:total_input_tokens) @total_output_tokens = args[:total_output_tokens] if args.key?(:total_output_tokens) @total_thought_tokens = args[:total_thought_tokens] if args.key?(:total_thought_tokens) @total_tokens = args[:total_tokens] if args.key?(:total_tokens) @total_tool_use_tokens = args[:total_tool_use_tokens] if args.key?(:total_tool_use_tokens) end |