Class: Google::Apis::AiplatformV1::GoogleCloudAiplatformV1CountTokensResponse
- Inherits:
-
Object
- Object
- Google::Apis::AiplatformV1::GoogleCloudAiplatformV1CountTokensResponse
- 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
Response message for PredictionService.CountTokens.
Instance Attribute Summary collapse
-
#prompt_tokens_details ⇒ Array<Google::Apis::AiplatformV1::GoogleCloudAiplatformV1ModalityTokenCount>
Output only.
-
#total_billable_characters ⇒ Fixnum
The total number of billable characters counted across all instances from the request.
-
#total_tokens ⇒ Fixnum
The total number of tokens counted across all instances from the request.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleCloudAiplatformV1CountTokensResponse
constructor
A new instance of GoogleCloudAiplatformV1CountTokensResponse.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleCloudAiplatformV1CountTokensResponse
Returns a new instance of GoogleCloudAiplatformV1CountTokensResponse.
4660 4661 4662 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 4660 def initialize(**args) update!(**args) end |
Instance Attribute Details
#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
4647 4648 4649 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 4647 def prompt_tokens_details @prompt_tokens_details end |
#total_billable_characters ⇒ Fixnum
The total number of billable characters counted across all instances from the
request.
Corresponds to the JSON property totalBillableCharacters
4653 4654 4655 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 4653 def total_billable_characters @total_billable_characters end |
#total_tokens ⇒ Fixnum
The total number of tokens counted across all instances from the request.
Corresponds to the JSON property totalTokens
4658 4659 4660 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 4658 def total_tokens @total_tokens end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
4665 4666 4667 4668 4669 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 4665 def update!(**args) @prompt_tokens_details = args[:prompt_tokens_details] if args.key?(:prompt_tokens_details) @total_billable_characters = args[:total_billable_characters] if args.key?(:total_billable_characters) @total_tokens = args[:total_tokens] if args.key?(:total_tokens) end |