Class: Google::Apis::AiplatformV1::GoogleCloudAiplatformV1ModalityTokenCount

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

Represents token counting info for a single modality.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudAiplatformV1ModalityTokenCount

Returns a new instance of GoogleCloudAiplatformV1ModalityTokenCount.



16503
16504
16505
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 16503

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

Instance Attribute Details

#modalityString

The modality associated with this token count. Corresponds to the JSON property modality

Returns:

  • (String)


16496
16497
16498
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 16496

def modality
  @modality
end

#token_countFixnum

Number of tokens. Corresponds to the JSON property tokenCount

Returns:

  • (Fixnum)


16501
16502
16503
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 16501

def token_count
  @token_count
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



16508
16509
16510
16511
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 16508

def update!(**args)
  @modality = args[:modality] if args.key?(:modality)
  @token_count = args[:token_count] if args.key?(:token_count)
end