Class: Google::Apis::AiplatformV1beta1::LearningGenaiRootScoredToken

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

A token with its own score.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ LearningGenaiRootScoredToken

Returns a new instance of LearningGenaiRootScoredToken.



33345
33346
33347
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 33345

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

Instance Attribute Details

#end_token_scoreFloat

Each end_token_score is a logprob for how well the completion would end at a particular token. See http://google3/labs/language/aida/config/proto/ model_config.proto;l=376;rcl=573039459 Corresponds to the JSON property endTokenScore

Returns:

  • (Float)


33333
33334
33335
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 33333

def end_token_score
  @end_token_score
end

#scoreFloat

Each score is the logprob for the token in model response. Corresponds to the JSON property score

Returns:

  • (Float)


33338
33339
33340
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 33338

def score
  @score
end

#tokenString

Corresponds to the JSON property token

Returns:

  • (String)


33343
33344
33345
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 33343

def token
  @token
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



33350
33351
33352
33353
33354
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 33350

def update!(**args)
  @end_token_score = args[:end_token_score] if args.key?(:end_token_score)
  @score = args[:score] if args.key?(:score)
  @token = args[:token] if args.key?(:token)
end