Class: Google::Apis::AiplatformV1::GoogleCloudAiplatformV1GeminiPreferenceExample

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

Input example for preference optimization.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudAiplatformV1GeminiPreferenceExample

Returns a new instance of GoogleCloudAiplatformV1GeminiPreferenceExample.



16054
16055
16056
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 16054

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

Instance Attribute Details

#completionsArray<Google::Apis::AiplatformV1::GoogleCloudAiplatformV1GeminiPreferenceExampleCompletion>

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



16047
16048
16049
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 16047

def completions
  @completions
end

#contentsArray<Google::Apis::AiplatformV1::GoogleCloudAiplatformV1Content>

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



16052
16053
16054
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 16052

def contents
  @contents
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



16059
16060
16061
16062
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 16059

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