Class: Google::Apis::AiplatformV1::GoogleCloudAiplatformV1LogprobsResultCandidate

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

Candidate for the logprobs token and score.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudAiplatformV1LogprobsResultCandidate

Returns a new instance of GoogleCloudAiplatformV1LogprobsResultCandidate.



13656
13657
13658
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 13656

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

Instance Attribute Details

#log_probabilityFloat

The candidate's log probability. Corresponds to the JSON property logProbability

Returns:

  • (Float)


13644
13645
13646
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 13644

def log_probability
  @log_probability
end

#tokenString

The candidate's token string value. Corresponds to the JSON property token

Returns:

  • (String)


13649
13650
13651
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 13649

def token
  @token
end

#token_idFixnum

The candidate's token id value. Corresponds to the JSON property tokenId

Returns:

  • (Fixnum)


13654
13655
13656
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 13654

def token_id
  @token_id
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



13661
13662
13663
13664
13665
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 13661

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