Class: AWSCDK::Bedrock::CfnPromptVersion::PromptTemplateConfigurationProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Bedrock::CfnPromptVersion::PromptTemplateConfigurationProperty
- Defined in:
- bedrock/cfn_prompt_version.rb
Overview
Contains the message for a prompt.
For more information, see Construct and store reusable prompts with Prompt management in Amazon Bedrock .
Instance Attribute Summary collapse
-
#chat ⇒ AWSCDK::IResolvable, ...
readonly
Contains configurations to use the prompt in a conversational format.
-
#text ⇒ AWSCDK::IResolvable, ...
readonly
Contains configurations for the text in a message for a prompt.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(chat: nil, text: nil) ⇒ PromptTemplateConfigurationProperty
constructor
A new instance of PromptTemplateConfigurationProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(chat: nil, text: nil) ⇒ PromptTemplateConfigurationProperty
Returns a new instance of PromptTemplateConfigurationProperty.
1050 1051 1052 1053 1054 1055 |
# File 'bedrock/cfn_prompt_version.rb', line 1050 def initialize(chat: nil, text: nil) @chat = chat.is_a?(Hash) ? ::AWSCDK::Bedrock::CfnPromptVersion::ChatPromptTemplateConfigurationProperty.new(**chat.transform_keys(&:to_sym)) : chat Jsii::Type.check_type(@chat, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19iZWRyb2NrLkNmblByb21wdFZlcnNpb24uQ2hhdFByb21wdFRlbXBsYXRlQ29uZmlndXJhdGlvblByb3BlcnR5In1dfX0=")), "chat") unless @chat.nil? @text = text.is_a?(Hash) ? ::AWSCDK::Bedrock::CfnPromptVersion::TextPromptTemplateConfigurationProperty.new(**text.transform_keys(&:to_sym)) : text Jsii::Type.check_type(@text, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19iZWRyb2NrLkNmblByb21wdFZlcnNpb24uVGV4dFByb21wdFRlbXBsYXRlQ29uZmlndXJhdGlvblByb3BlcnR5In1dfX0=")), "text") unless @text.nil? end |
Instance Attribute Details
#chat ⇒ AWSCDK::IResolvable, ... (readonly)
Contains configurations to use the prompt in a conversational format.
1061 1062 1063 |
# File 'bedrock/cfn_prompt_version.rb', line 1061 def chat @chat end |
#text ⇒ AWSCDK::IResolvable, ... (readonly)
Contains configurations for the text in a message for a prompt.
1066 1067 1068 |
# File 'bedrock/cfn_prompt_version.rb', line 1066 def text @text end |
Class Method Details
.jsii_properties ⇒ Object
1068 1069 1070 1071 1072 1073 |
# File 'bedrock/cfn_prompt_version.rb', line 1068 def self.jsii_properties { :chat => "chat", :text => "text", } end |
Instance Method Details
#to_jsii ⇒ Object
1075 1076 1077 1078 1079 1080 1081 1082 |
# File 'bedrock/cfn_prompt_version.rb', line 1075 def to_jsii result = {} result.merge!({ "chat" => @chat, "text" => @text, }) result.compact end |