Class: Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1LogprobsResultCandidate
- Inherits:
-
Object
- Object
- Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1LogprobsResultCandidate
- 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
A single token and its associated log probability.
Instance Attribute Summary collapse
-
#log_probability ⇒ Float
The log probability of this token.
-
#token ⇒ String
The token's string representation.
-
#token_id ⇒ Fixnum
The token's numerical ID.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleCloudAiplatformV1beta1LogprobsResultCandidate
constructor
A new instance of GoogleCloudAiplatformV1beta1LogprobsResultCandidate.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleCloudAiplatformV1beta1LogprobsResultCandidate
Returns a new instance of GoogleCloudAiplatformV1beta1LogprobsResultCandidate.
31665 31666 31667 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 31665 def initialize(**args) update!(**args) end |
Instance Attribute Details
#log_probability ⇒ Float
The log probability of this token. A higher value indicates that the model was
more confident in this token. The log probability can be used to assess the
relative likelihood of different tokens and to identify when the model is
uncertain.
Corresponds to the JSON property logProbability
31650 31651 31652 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 31650 def log_probability @log_probability end |
#token ⇒ String
The token's string representation.
Corresponds to the JSON property token
31655 31656 31657 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 31655 def token @token end |
#token_id ⇒ Fixnum
The token's numerical ID. While the token field provides the string
representation of the token, the token_id is the numerical representation
that the model uses internally. This can be useful for developers who want to
build custom logic based on the model's vocabulary.
Corresponds to the JSON property tokenId
31663 31664 31665 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 31663 def token_id @token_id end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
31670 31671 31672 31673 31674 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 31670 def update!(**args) @log_probability = args[:log_probability] if args.key?(:log_probability) @token = args[:token] if args.key?(:token) @token_id = args[:token_id] if args.key?(:token_id) end |