Class: Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1TokensInfo
- Inherits:
-
Object
- Object
- Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1TokensInfo
- 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
-
#role ⇒ String
Optional.
-
#token_ids ⇒ Array<Fixnum>
A list of token ids from the input.
-
#tokens ⇒ Array<String>
A list of tokens from the input.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleCloudAiplatformV1beta1TokensInfo
constructor
A new instance of GoogleCloudAiplatformV1beta1TokensInfo.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleCloudAiplatformV1beta1TokensInfo
Returns a new instance of GoogleCloudAiplatformV1beta1TokensInfo.
34404 34405 34406 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 34404 def initialize(**args) update!(**args) end |
Instance Attribute Details
#role ⇒ String
Optional. Optional fields for the role from the corresponding Content.
Corresponds to the JSON property role
34392 34393 34394 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 34392 def role @role end |
#token_ids ⇒ Array<Fixnum>
A list of token ids from the input.
Corresponds to the JSON property tokenIds
34397 34398 34399 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 34397 def token_ids @token_ids end |
#tokens ⇒ Array<String>
A list of tokens from the input.
Corresponds to the JSON property tokens
34402 34403 34404 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 34402 def tokens @tokens end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
34409 34410 34411 34412 34413 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 34409 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 |