Class: AWSCDK::Bedrock::CfnPromptVersion::TextPromptTemplateConfigurationProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Bedrock::CfnPromptVersion::TextPromptTemplateConfigurationProperty
- Defined in:
- bedrock/cfn_prompt_version.rb
Overview
Contains configurations for a text prompt template.
To include a variable, enclose a word in double curly braces as in {{variable}} .
Instance Attribute Summary collapse
-
#cache_point ⇒ AWSCDK::IResolvable, ...
readonly
A cache checkpoint within a template configuration.
-
#input_variables ⇒ AWSCDK::IResolvable, ...
readonly
An array of the variables in the prompt template.
-
#text ⇒ String
readonly
The message for the prompt.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(text:, cache_point: nil, input_variables: nil) ⇒ TextPromptTemplateConfigurationProperty
constructor
A new instance of TextPromptTemplateConfigurationProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(text:, cache_point: nil, input_variables: nil) ⇒ TextPromptTemplateConfigurationProperty
Returns a new instance of TextPromptTemplateConfigurationProperty.
1283 1284 1285 1286 1287 1288 1289 1290 |
# File 'bedrock/cfn_prompt_version.rb', line 1283 def initialize(text:, cache_point: nil, input_variables: nil) @text = text Jsii::Type.check_type(@text, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "text") @cache_point = cache_point.is_a?(Hash) ? ::AWSCDK::Bedrock::CfnPromptVersion::CachePointBlockProperty.new(**cache_point.transform_keys(&:to_sym)) : cache_point Jsii::Type.check_type(@cache_point, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19iZWRyb2NrLkNmblByb21wdFZlcnNpb24uQ2FjaGVQb2ludEJsb2NrUHJvcGVydHkifV19fQ==")), "cachePoint") unless @cache_point.nil? @input_variables = input_variables Jsii::Type.check_type(@input_variables, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYmVkcm9jay5DZm5Qcm9tcHRWZXJzaW9uLlByb21wdElucHV0VmFyaWFibGVQcm9wZXJ0eSJ9XX19LCJraW5kIjoiYXJyYXkifX1dfX0=")), "inputVariables") unless @input_variables.nil? end |
Instance Attribute Details
#cache_point ⇒ AWSCDK::IResolvable, ... (readonly)
A cache checkpoint within a template configuration.
1301 1302 1303 |
# File 'bedrock/cfn_prompt_version.rb', line 1301 def cache_point @cache_point end |
#input_variables ⇒ AWSCDK::IResolvable, ... (readonly)
An array of the variables in the prompt template.
1306 1307 1308 |
# File 'bedrock/cfn_prompt_version.rb', line 1306 def input_variables @input_variables end |
#text ⇒ String (readonly)
The message for the prompt.
1296 1297 1298 |
# File 'bedrock/cfn_prompt_version.rb', line 1296 def text @text end |
Class Method Details
.jsii_properties ⇒ Object
1308 1309 1310 1311 1312 1313 1314 |
# File 'bedrock/cfn_prompt_version.rb', line 1308 def self.jsii_properties { :text => "text", :cache_point => "cachePoint", :input_variables => "inputVariables", } end |
Instance Method Details
#to_jsii ⇒ Object
1316 1317 1318 1319 1320 1321 1322 1323 1324 |
# File 'bedrock/cfn_prompt_version.rb', line 1316 def to_jsii result = {} result.merge!({ "text" => @text, "cachePoint" => @cache_point, "inputVariables" => @input_variables, }) result.compact end |