Class: Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1GeminiPreferenceExample

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

Input example for preference optimization.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudAiplatformV1beta1GeminiPreferenceExample

Returns a new instance of GoogleCloudAiplatformV1beta1GeminiPreferenceExample.



23502
23503
23504
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 23502

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

Instance Attribute Details

#completionsArray<Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1GeminiPreferenceExampleCompletion>

List of completions for a given prompt. Corresponds to the JSON property completions



23495
23496
23497
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 23495

def completions
  @completions
end

#contentsArray<Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1Content>

Multi-turn contents that represents the Prompt. Corresponds to the JSON property contents



23500
23501
23502
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 23500

def contents
  @contents
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



23507
23508
23509
23510
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 23507

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