Class: Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1TokensInfo

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

Tokens info with a list of tokens and the corresponding list of token ids.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudAiplatformV1beta1TokensInfo

Returns a new instance of GoogleCloudAiplatformV1beta1TokensInfo.



54451
54452
54453
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 54451

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

Instance Attribute Details

#roleString

Optional. Optional fields for the role from the corresponding Content. Corresponds to the JSON property role

Returns:

  • (String)


54439
54440
54441
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 54439

def role
  @role
end

#token_idsArray<Fixnum>

A list of token ids from the input. Corresponds to the JSON property tokenIds

Returns:

  • (Array<Fixnum>)


54444
54445
54446
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 54444

def token_ids
  @token_ids
end

#tokensArray<String>

A list of tokens from the input. Corresponds to the JSON property tokens

Returns:

  • (Array<String>)


54449
54450
54451
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 54449

def tokens
  @tokens
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



54456
54457
54458
54459
54460
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 54456

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