Class: Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1GeminiPreferenceExampleCompletion

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

Completion and its preference score.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudAiplatformV1beta1GeminiPreferenceExampleCompletion

Returns a new instance of GoogleCloudAiplatformV1beta1GeminiPreferenceExampleCompletion.



24876
24877
24878
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 24876

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

Instance Attribute Details

#completionGoogle::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1Content

The structured data content of a message. A Content message contains a role field, which indicates the producer of the content, and a parts field, which contains the multi-part data of the message. Corresponds to the JSON property completion



24869
24870
24871
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 24869

def completion
  @completion
end

#scoreFloat

The score for the given completion. Corresponds to the JSON property score

Returns:

  • (Float)


24874
24875
24876
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 24874

def score
  @score
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



24881
24882
24883
24884
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 24881

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