Class: Google::Apis::AiplatformV1::GoogleCloudAiplatformV1GeminiPreferenceExampleCompletion

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

Completion and its preference score.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudAiplatformV1GeminiPreferenceExampleCompletion

Returns a new instance of GoogleCloudAiplatformV1GeminiPreferenceExampleCompletion.



15865
15866
15867
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 15865

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

Instance Attribute Details

#completionGoogle::Apis::AiplatformV1::GoogleCloudAiplatformV1Content

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



15858
15859
15860
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 15858

def completion
  @completion
end

#scoreFloat

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

Returns:

  • (Float)


15863
15864
15865
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 15863

def score
  @score
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



15870
15871
15872
15873
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 15870

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