Class: AWSCDK::Bedrock::CfnFlowVersion::TextPromptTemplateConfigurationProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Bedrock::CfnFlowVersion::TextPromptTemplateConfigurationProperty
- Defined in:
- bedrock/cfn_flow_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
-
#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:, input_variables: nil) ⇒ TextPromptTemplateConfigurationProperty
constructor
A new instance of TextPromptTemplateConfigurationProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(text:, input_variables: nil) ⇒ TextPromptTemplateConfigurationProperty
Returns a new instance of TextPromptTemplateConfigurationProperty.
2503 2504 2505 2506 2507 2508 |
# File 'bedrock/cfn_flow_version.rb', line 2503 def initialize(text:, input_variables: nil) @text = text Jsii::Type.check_type(@text, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "text") @input_variables = input_variables Jsii::Type.check_type(@input_variables, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYmVkcm9jay5DZm5GbG93VmVyc2lvbi5Qcm9tcHRJbnB1dFZhcmlhYmxlUHJvcGVydHkifV19fSwia2luZCI6ImFycmF5In19XX19")), "inputVariables") unless @input_variables.nil? end |
Instance Attribute Details
#input_variables ⇒ AWSCDK::IResolvable, ... (readonly)
An array of the variables in the prompt template.
2519 2520 2521 |
# File 'bedrock/cfn_flow_version.rb', line 2519 def input_variables @input_variables end |
#text ⇒ String (readonly)
The message for the prompt.
2514 2515 2516 |
# File 'bedrock/cfn_flow_version.rb', line 2514 def text @text end |
Class Method Details
.jsii_properties ⇒ Object
2521 2522 2523 2524 2525 2526 |
# File 'bedrock/cfn_flow_version.rb', line 2521 def self.jsii_properties { :text => "text", :input_variables => "inputVariables", } end |
Instance Method Details
#to_jsii ⇒ Object
2528 2529 2530 2531 2532 2533 2534 2535 |
# File 'bedrock/cfn_flow_version.rb', line 2528 def to_jsii result = {} result.merge!({ "text" => @text, "inputVariables" => @input_variables, }) result.compact end |