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.



38504
38505
38506
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 38504

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

Instance Attribute Details

#app_builder_dataGoogle::Apis::AiplatformV1::GoogleCloudAiplatformV1SchemaPromptSpecAppBuilderData

Defines data for an application builder. Corresponds to the JSON property appBuilderData



38453
38454
38455
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 38453

def app_builder_data
  @app_builder_data
end

#contextGoogle::Apis::AiplatformV1::GoogleCloudAiplatformV1Content

The structured data content of a message. A Content message contains a role field, which indicates the producer of the content, and a parts field, which contains the multi-part data of the message. Corresponds to the JSON property context



38460
38461
38462
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 38460

def context
  @context
end

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

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



38465
38466
38467
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 38465

def examples
  @examples
end

#infill_prefixString

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

Returns:

  • (String)


38470
38471
38472
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 38470

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)


38475
38476
38477
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 38475

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


38480
38481
38482
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 38480

def input_prefixes
  @input_prefixes
end

#interaction_dataGoogle::Apis::AiplatformV1::GoogleCloudAiplatformV1SchemaPromptSpecInteractionData

Defines data for an interaction prompt. Corresponds to the JSON property interactionData



38485
38486
38487
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 38485

def interaction_data
  @interaction_data
end

#output_prefixesArray<String>

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

Returns:

  • (Array<String>)


38490
38491
38492
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 38490

def output_prefixes
  @output_prefixes
end

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

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



38496
38497
38498
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 38496

def prediction_inputs
  @prediction_inputs
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



38502
38503
38504
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 38502

def prompt_message
  @prompt_message
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



38509
38510
38511
38512
38513
38514
38515
38516
38517
38518
38519
38520
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 38509

def update!(**args)
  @app_builder_data = args[:app_builder_data] if args.key?(:app_builder_data)
  @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)
  @interaction_data = args[:interaction_data] if args.key?(:interaction_data)
  @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