Class: Google::Apis::FirebasemlV2beta::GoogleCloudAiplatformV1beta1ModalityTokenCount
- Inherits:
-
Object
- Object
- Google::Apis::FirebasemlV2beta::GoogleCloudAiplatformV1beta1ModalityTokenCount
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/firebaseml_v2beta/classes.rb,
lib/google/apis/firebaseml_v2beta/representations.rb,
lib/google/apis/firebaseml_v2beta/representations.rb
Overview
Represents a breakdown of token usage by modality. This message is used in CountTokensResponse and GenerateContentResponse.UsageMetadata to provide a detailed view of how many tokens are used by each modality (e.g., text, image, video) in a request. This is particularly useful for multimodal models, allowing you to track and manage token consumption for billing and quota purposes.
Instance Attribute Summary collapse
-
#modality ⇒ String
The modality that this token count applies to.
-
#token_count ⇒ Fixnum
The number of tokens counted for this modality.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleCloudAiplatformV1beta1ModalityTokenCount
constructor
A new instance of GoogleCloudAiplatformV1beta1ModalityTokenCount.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleCloudAiplatformV1beta1ModalityTokenCount
Returns a new instance of GoogleCloudAiplatformV1beta1ModalityTokenCount.
2380 2381 2382 |
# File 'lib/google/apis/firebaseml_v2beta/classes.rb', line 2380 def initialize(**args) update!(**args) end |
Instance Attribute Details
#modality ⇒ String
The modality that this token count applies to.
Corresponds to the JSON property modality
2373 2374 2375 |
# File 'lib/google/apis/firebaseml_v2beta/classes.rb', line 2373 def modality @modality end |
#token_count ⇒ Fixnum
The number of tokens counted for this modality.
Corresponds to the JSON property tokenCount
2378 2379 2380 |
# File 'lib/google/apis/firebaseml_v2beta/classes.rb', line 2378 def token_count @token_count end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
2385 2386 2387 2388 |
# File 'lib/google/apis/firebaseml_v2beta/classes.rb', line 2385 def update!(**args) @modality = args[:modality] if args.key?(:modality) @token_count = args[:token_count] if args.key?(:token_count) end |