Class: AWSCDK::Bedrock::CfnPromptVersion::MessageProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Bedrock::CfnPromptVersion::MessageProperty
- Defined in:
- bedrock/cfn_prompt_version.rb
Overview
A message input, or returned from, a call to Converse or ConverseStream .
Instance Attribute Summary collapse
-
#content ⇒ AWSCDK::IResolvable, Array<AWSCDK::IResolvable, AWSCDK::Bedrock::CfnPromptVersion::ContentBlockProperty>
readonly
The message content.
-
#role ⇒ String
readonly
The role that the message plays in the message.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(content:, role:) ⇒ MessageProperty
constructor
A new instance of MessageProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(content:, role:) ⇒ MessageProperty
Returns a new instance of MessageProperty.
752 753 754 755 756 757 |
# File 'bedrock/cfn_prompt_version.rb', line 752 def initialize(content:, role:) @content = content Jsii::Type.check_type(@content, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYmVkcm9jay5DZm5Qcm9tcHRWZXJzaW9uLkNvbnRlbnRCbG9ja1Byb3BlcnR5In1dfX0sImtpbmQiOiJhcnJheSJ9fV19fQ==")), "content") @role = role Jsii::Type.check_type(@role, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "role") end |
Instance Attribute Details
#content ⇒ AWSCDK::IResolvable, Array<AWSCDK::IResolvable, AWSCDK::Bedrock::CfnPromptVersion::ContentBlockProperty> (readonly)
The message content. Note the following restrictions:.
- You can include up to 20 images. Each image's size, height, and width must be no more than 3.75 MB, 8000 px, and 8000 px, respectively.
- You can include up to five documents. Each document's size must be no more than 4.5 MB.
- If you include a
ContentBlockwith adocumentfield in the array, you must also include aContentBlockwith atextfield. - You can only include images and documents if the
roleisuser.
768 769 770 |
# File 'bedrock/cfn_prompt_version.rb', line 768 def content @content end |
#role ⇒ String (readonly)
The role that the message plays in the message.
773 774 775 |
# File 'bedrock/cfn_prompt_version.rb', line 773 def role @role end |
Class Method Details
.jsii_properties ⇒ Object
775 776 777 778 779 780 |
# File 'bedrock/cfn_prompt_version.rb', line 775 def self.jsii_properties { :content => "content", :role => "role", } end |
Instance Method Details
#to_jsii ⇒ Object
782 783 784 785 786 787 788 789 |
# File 'bedrock/cfn_prompt_version.rb', line 782 def to_jsii result = {} result.merge!({ "content" => @content, "role" => @role, }) result.compact end |