Class: Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1SchemaPromptSpecStructuredPrompt

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

Prompt variation that stores preambles in separate fields.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudAiplatformV1beta1SchemaPromptSpecStructuredPrompt

Returns a new instance of GoogleCloudAiplatformV1beta1SchemaPromptSpecStructuredPrompt.



31696
31697
31698
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 31696

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

Instance Attribute Details

#contextGoogle::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1Content

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



31657
31658
31659
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 31657

def context
  @context
end

#examplesArray<Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1SchemaPromptSpecPartList>

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



31662
31663
31664
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 31662

def examples
  @examples
end

#infill_prefixString

Preamble: For infill prompt, the prefix before expected model response. Corresponds to the JSON property infillPrefix

Returns:

  • (String)


31667
31668
31669
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 31667

def infill_prefix
  @infill_prefix
end

#infill_suffixString

Preamble: For infill prompt, the suffix after expected model response. Corresponds to the JSON property infillSuffix

Returns:

  • (String)


31672
31673
31674
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 31672

def infill_suffix
  @infill_suffix
end

#input_prefixesArray<String>

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

Returns:

  • (Array<String>)


31677
31678
31679
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 31677

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>)


31682
31683
31684
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 31682

def output_prefixes
  @output_prefixes
end

#prediction_inputsArray<Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1SchemaPromptSpecPartList>

Preamble: The input test data for prediction. Each PartList in this field represents one text-only input set for a single model request. Corresponds to the JSON property predictionInputs



31688
31689
31690
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 31688

def prediction_inputs
  @prediction_inputs
end

#prompt_messageGoogle::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1SchemaPromptSpecPromptMessage

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



31694
31695
31696
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 31694

def prompt_message
  @prompt_message
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



31701
31702
31703
31704
31705
31706
31707
31708
31709
31710
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 31701

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