Class: Google::Apis::AiplatformV1::GoogleCloudAiplatformV1SchemaPromptSpecStructuredPrompt

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 variation that stores preambles in separate fields.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudAiplatformV1SchemaPromptSpecStructuredPrompt

Returns a new instance of GoogleCloudAiplatformV1SchemaPromptSpecStructuredPrompt.



25456
25457
25458
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 25456

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

Instance Attribute Details

#contextGoogle::Apis::AiplatformV1::GoogleCloudAiplatformV1Content

The base structured datatype containing multi-part content of a message. A Content includes a role field designating the producer of the Content and a parts field containing multi-part data that contains the content of the message turn. Corresponds to the JSON property context



25433
25434
25435
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 25433

def context
  @context
end

#examplesArray<Google::Apis::AiplatformV1::GoogleCloudAiplatformV1SchemaPromptSpecPartList>

Preamble: A set of examples for expected model response. Corresponds to the JSON property examples



25438
25439
25440
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 25438

def examples
  @examples
end

#input_prefixesArray<String>

Preamble: The input prefixes before each example input. Corresponds to the JSON property inputPrefixes

Returns:

  • (Array<String>)


25443
25444
25445
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 25443

def input_prefixes
  @input_prefixes
end

#output_prefixesArray<String>

Preamble: The output prefixes before each example output. Corresponds to the JSON property outputPrefixes

Returns:

  • (Array<String>)


25448
25449
25450
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 25448

def output_prefixes
  @output_prefixes
end

#prompt_messageGoogle::Apis::AiplatformV1::GoogleCloudAiplatformV1SchemaPromptSpecPromptMessage

The prompt message that aligns with the prompt message in google.cloud. aiplatform.master.GenerateContentRequest. Corresponds to the JSON property promptMessage



25454
25455
25456
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 25454

def prompt_message
  @prompt_message
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



25461
25462
25463
25464
25465
25466
25467
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 25461

def update!(**args)
  @context = args[:context] if args.key?(:context)
  @examples = args[:examples] if args.key?(:examples)
  @input_prefixes = args[:input_prefixes] if args.key?(:input_prefixes)
  @output_prefixes = args[:output_prefixes] if args.key?(:output_prefixes)
  @prompt_message = args[:prompt_message] if args.key?(:prompt_message)
end