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.



10118
10119
10120
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 10118

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



10106
10107
10108
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 10106

def prompt_template_data
  @prompt_template_data
end

#textString

Text prompt. Corresponds to the JSON property text

Returns:

  • (String)


10111
10112
10113
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 10111

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)


10116
10117
10118
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 10116

def value
  @value
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



10123
10124
10125
10126
10127
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 10123

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