Class: Google::Apis::AiplatformV1beta1::GenaiVertexV1beta1InteractionUsageModalityTokens

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

The token count for a single response modality.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GenaiVertexV1beta1InteractionUsageModalityTokens

Returns a new instance of GenaiVertexV1beta1InteractionUsageModalityTokens.



4013
4014
4015
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 4013

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

Instance Attribute Details

#modalityString

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

Returns:

  • (String)


4006
4007
4008
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 4006

def modality
  @modality
end

#tokensFixnum

Number of tokens for the modality. Corresponds to the JSON property tokens

Returns:

  • (Fixnum)


4011
4012
4013
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 4011

def tokens
  @tokens
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



4018
4019
4020
4021
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 4018

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