Class: AWSCDK::Bedrock::CfnFlow::TextPromptTemplateConfigurationProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Bedrock::CfnFlow::TextPromptTemplateConfigurationProperty
- Defined in:
- bedrock/cfn_flow.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.
2735 2736 2737 2738 2739 2740 |
# File 'bedrock/cfn_flow.rb', line 2735 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("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYmVkcm9jay5DZm5GbG93LlByb21wdElucHV0VmFyaWFibGVQcm9wZXJ0eSJ9XX19LCJraW5kIjoiYXJyYXkifX1dfX0=")), "inputVariables") unless @input_variables.nil? end |
Instance Attribute Details
#input_variables ⇒ AWSCDK::IResolvable, ... (readonly)
An array of the variables in the prompt template.
2751 2752 2753 |
# File 'bedrock/cfn_flow.rb', line 2751 def input_variables @input_variables end |
#text ⇒ String (readonly)
The message for the prompt.
2746 2747 2748 |
# File 'bedrock/cfn_flow.rb', line 2746 def text @text end |
Class Method Details
.jsii_properties ⇒ Object
2753 2754 2755 2756 2757 2758 |
# File 'bedrock/cfn_flow.rb', line 2753 def self.jsii_properties { :text => "text", :input_variables => "inputVariables", } end |
Instance Method Details
#to_jsii ⇒ Object
2760 2761 2762 2763 2764 2765 2766 2767 |
# File 'bedrock/cfn_flow.rb', line 2760 def to_jsii result = {} result.merge!({ "text" => @text, "inputVariables" => @input_variables, }) result.compact end |