Class: AWSCDK::Bedrock::CfnPrompt::MessageProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Bedrock::CfnPrompt::MessageProperty
- Defined in:
- bedrock/cfn_prompt.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::CfnPrompt::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.
759 760 761 762 763 764 |
# File 'bedrock/cfn_prompt.rb', line 759 def initialize(content:, role:) @content = content Jsii::Type.check_type(@content, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYmVkcm9jay5DZm5Qcm9tcHQuQ29udGVudEJsb2NrUHJvcGVydHkifV19fSwia2luZCI6ImFycmF5In19XX19")), "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::CfnPrompt::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.
775 776 777 |
# File 'bedrock/cfn_prompt.rb', line 775 def content @content end |
#role ⇒ String (readonly)
The role that the message plays in the message.
780 781 782 |
# File 'bedrock/cfn_prompt.rb', line 780 def role @role end |
Class Method Details
.jsii_properties ⇒ Object
782 783 784 785 786 787 |
# File 'bedrock/cfn_prompt.rb', line 782 def self.jsii_properties { :content => "content", :role => "role", } end |
Instance Method Details
#to_jsii ⇒ Object
789 790 791 792 793 794 795 796 |
# File 'bedrock/cfn_prompt.rb', line 789 def to_jsii result = {} result.merge!({ "content" => @content, "role" => @role, }) result.compact end |