Class: Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1SchemaPromptSpecTranslationPrompt

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 for Translation use case.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudAiplatformV1beta1SchemaPromptSpecTranslationPrompt

Returns a new instance of GoogleCloudAiplatformV1beta1SchemaPromptSpecTranslationPrompt.



32275
32276
32277
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 32275

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

Instance Attribute Details

#exampleGoogle::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1SchemaPromptSpecTranslationExample

The translation example that contains reference sentences from various sources. Corresponds to the JSON property example



32252
32253
32254
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 32252

def example
  @example
end

#optionGoogle::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1SchemaPromptSpecTranslationOption

Optional settings for translation prompt. Corresponds to the JSON property option



32257
32258
32259
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 32257

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



32263
32264
32265
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 32263

def prompt_message
  @prompt_message
end

#source_language_codeString

The source language code. Corresponds to the JSON property sourceLanguageCode

Returns:

  • (String)


32268
32269
32270
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 32268

def source_language_code
  @source_language_code
end

#target_language_codeString

The target language code. Corresponds to the JSON property targetLanguageCode

Returns:

  • (String)


32273
32274
32275
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 32273

def target_language_code
  @target_language_code
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



32280
32281
32282
32283
32284
32285
32286
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 32280

def update!(**args)
  @example = args[:example] if args.key?(:example)
  @option = args[:option] if args.key?(:option)
  @prompt_message = args[:prompt_message] if args.key?(:prompt_message)
  @source_language_code = args[:source_language_code] if args.key?(:source_language_code)
  @target_language_code = args[:target_language_code] if args.key?(:target_language_code)
end