Class: Google::Apis::AiplatformV1::GoogleCloudAiplatformV1EvaluationPrompt

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

Prompt to be evaluated. This can represent a single-turn prompt or a multi- turn conversation for agent evaluations.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudAiplatformV1EvaluationPrompt

Returns a new instance of GoogleCloudAiplatformV1EvaluationPrompt.



10230
10231
10232
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 10230

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

Instance Attribute Details

#prompt_template_dataGoogle::Apis::AiplatformV1::GoogleCloudAiplatformV1EvaluationPromptPromptTemplateData

Message to hold a prompt template and the values to populate the template. Corresponds to the JSON property promptTemplateData



10218
10219
10220
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 10218

def prompt_template_data
  @prompt_template_data
end

#textString

Text prompt. Corresponds to the JSON property text

Returns:

  • (String)


10223
10224
10225
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 10223

def text
  @text
end

#valueObject

Fields and values that can be used to populate the prompt template. Corresponds to the JSON property value

Returns:

  • (Object)


10228
10229
10230
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 10228

def value
  @value
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



10235
10236
10237
10238
10239
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 10235

def update!(**args)
  @prompt_template_data = args[:prompt_template_data] if args.key?(:prompt_template_data)
  @text = args[:text] if args.key?(:text)
  @value = args[:value] if args.key?(:value)
end