Class: Google::Apis::AiplatformV1::GoogleCloudAiplatformV1SchemaPromptSpecStructuredPrompt
- Inherits:
-
Object
- Object
- Google::Apis::AiplatformV1::GoogleCloudAiplatformV1SchemaPromptSpecStructuredPrompt
- 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
-
#context ⇒ Google::Apis::AiplatformV1::GoogleCloudAiplatformV1Content
The base structured datatype containing multi-part content of a message.
-
#examples ⇒ Array<Google::Apis::AiplatformV1::GoogleCloudAiplatformV1SchemaPromptSpecPartList>
Preamble: A set of examples for expected model response.
-
#infill_prefix ⇒ String
Preamble: For infill prompt, the prefix before expected model response.
-
#infill_suffix ⇒ String
Preamble: For infill prompt, the suffix after expected model response.
-
#input_prefixes ⇒ Array<String>
Preamble: The input prefixes before each example input.
-
#output_prefixes ⇒ Array<String>
Preamble: The output prefixes before each example output.
-
#prediction_inputs ⇒ Array<Google::Apis::AiplatformV1::GoogleCloudAiplatformV1SchemaPromptSpecPartList>
Preamble: The input test data for prediction.
-
#prompt_message ⇒ Google::Apis::AiplatformV1::GoogleCloudAiplatformV1SchemaPromptSpecPromptMessage
The prompt message that aligns with the prompt message in google.cloud.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleCloudAiplatformV1SchemaPromptSpecStructuredPrompt
constructor
A new instance of GoogleCloudAiplatformV1SchemaPromptSpecStructuredPrompt.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleCloudAiplatformV1SchemaPromptSpecStructuredPrompt
Returns a new instance of GoogleCloudAiplatformV1SchemaPromptSpecStructuredPrompt.
27936 27937 27938 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 27936 def initialize(**args) update!(**args) end |
Instance Attribute Details
#context ⇒ Google::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
27897 27898 27899 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 27897 def context @context end |
#examples ⇒ Array<Google::Apis::AiplatformV1::GoogleCloudAiplatformV1SchemaPromptSpecPartList>
Preamble: A set of examples for expected model response.
Corresponds to the JSON property examples
27902 27903 27904 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 27902 def examples @examples end |
#infill_prefix ⇒ String
Preamble: For infill prompt, the prefix before expected model response.
Corresponds to the JSON property infillPrefix
27907 27908 27909 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 27907 def infill_prefix @infill_prefix end |
#infill_suffix ⇒ String
Preamble: For infill prompt, the suffix after expected model response.
Corresponds to the JSON property infillSuffix
27912 27913 27914 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 27912 def infill_suffix @infill_suffix end |
#input_prefixes ⇒ Array<String>
Preamble: The input prefixes before each example input.
Corresponds to the JSON property inputPrefixes
27917 27918 27919 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 27917 def input_prefixes @input_prefixes end |
#output_prefixes ⇒ Array<String>
Preamble: The output prefixes before each example output.
Corresponds to the JSON property outputPrefixes
27922 27923 27924 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 27922 def output_prefixes @output_prefixes end |
#prediction_inputs ⇒ Array<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
27928 27929 27930 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 27928 def prediction_inputs @prediction_inputs end |
#prompt_message ⇒ Google::Apis::AiplatformV1::GoogleCloudAiplatformV1SchemaPromptSpecPromptMessage
The prompt message that aligns with the prompt message in google.cloud.
aiplatform.master.GenerateContentRequest.
Corresponds to the JSON property promptMessage
27934 27935 27936 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 27934 def @prompt_message end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
27941 27942 27943 27944 27945 27946 27947 27948 27949 27950 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 27941 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 |