Class: Google::Apis::AiplatformV1::GoogleCloudAiplatformV1SchemaPromptSpecTranslationPrompt

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudAiplatformV1SchemaPromptSpecTranslationPrompt

Returns a new instance of GoogleCloudAiplatformV1SchemaPromptSpecTranslationPrompt.



30151
30152
30153
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 30151

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

Instance Attribute Details

#exampleGoogle::Apis::AiplatformV1::GoogleCloudAiplatformV1SchemaPromptSpecTranslationExample

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



30128
30129
30130
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 30128

def example
  @example
end

#optionGoogle::Apis::AiplatformV1::GoogleCloudAiplatformV1SchemaPromptSpecTranslationOption

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



30133
30134
30135
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 30133

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



30139
30140
30141
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 30139

def prompt_message
  @prompt_message
end

#source_language_codeString

The source language code. Corresponds to the JSON property sourceLanguageCode

Returns:

  • (String)


30144
30145
30146
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 30144

def source_language_code
  @source_language_code
end

#target_language_codeString

The target language code. Corresponds to the JSON property targetLanguageCode

Returns:

  • (String)


30149
30150
30151
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 30149

def target_language_code
  @target_language_code
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



30156
30157
30158
30159
30160
30161
30162
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 30156

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