Class: Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1CountTokensResponse

Inherits:
Object
  • Object
show all
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

Response message for PredictionService.CountTokens.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudAiplatformV1beta1CountTokensResponse

Returns a new instance of GoogleCloudAiplatformV1beta1CountTokensResponse.



11960
11961
11962
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 11960

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#prompt_tokens_detailsArray<Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1ModalityTokenCount>

Output only. List of modalities that were processed in the request input. Corresponds to the JSON property promptTokensDetails



11947
11948
11949
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 11947

def prompt_tokens_details
  @prompt_tokens_details
end

#total_billable_charactersFixnum

The total number of billable characters counted across all instances from the request. Corresponds to the JSON property totalBillableCharacters

Returns:

  • (Fixnum)


11953
11954
11955
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 11953

def total_billable_characters
  @total_billable_characters
end

#total_tokensFixnum

The total number of tokens counted across all instances from the request. Corresponds to the JSON property totalTokens

Returns:

  • (Fixnum)


11958
11959
11960
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 11958

def total_tokens
  @total_tokens
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



11965
11966
11967
11968
11969
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 11965

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