Class: Google::Apis::AiplatformV1::GoogleCloudAiplatformV1TokensInfo

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

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) ⇒ GoogleCloudAiplatformV1TokensInfo

Returns a new instance of GoogleCloudAiplatformV1TokensInfo.



27902
27903
27904
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 27902

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

Instance Attribute Details

#token_idsArray<Fixnum>

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

Returns:

  • (Array<Fixnum>)


27895
27896
27897
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 27895

def token_ids
  @token_ids
end

#tokensArray<String>

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

Returns:

  • (Array<String>)


27900
27901
27902
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 27900

def tokens
  @tokens
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



27907
27908
27909
27910
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 27907

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