Class: AWSCDK::Bedrock::CfnPrompt::ContentBlockProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Bedrock::CfnPrompt::ContentBlockProperty
- Defined in:
- bedrock/cfn_prompt.rb
Overview
A block of content for a message that you pass to, or receive from, a model with the Converse or ConverseStream API operations.
Instance Attribute Summary collapse
-
#cache_point ⇒ AWSCDK::IResolvable, ...
readonly
CachePoint to include in the message.
-
#text ⇒ String?
readonly
Text to include in the message.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(cache_point: nil, text: nil) ⇒ ContentBlockProperty
constructor
A new instance of ContentBlockProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(cache_point: nil, text: nil) ⇒ ContentBlockProperty
Returns a new instance of ContentBlockProperty.
716 717 718 719 720 721 |
# File 'bedrock/cfn_prompt.rb', line 716 def initialize(cache_point: nil, text: nil) @cache_point = cache_point.is_a?(Hash) ? ::AWSCDK::Bedrock::CfnPrompt::CachePointBlockProperty.new(**cache_point.transform_keys(&:to_sym)) : cache_point Jsii::Type.check_type(@cache_point, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19iZWRyb2NrLkNmblByb21wdC5DYWNoZVBvaW50QmxvY2tQcm9wZXJ0eSJ9XX19")), "cachePoint") unless @cache_point.nil? @text = text Jsii::Type.check_type(@text, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "text") unless @text.nil? end |
Instance Attribute Details
#cache_point ⇒ AWSCDK::IResolvable, ... (readonly)
CachePoint to include in the message.
727 728 729 |
# File 'bedrock/cfn_prompt.rb', line 727 def cache_point @cache_point end |
#text ⇒ String? (readonly)
Text to include in the message.
732 733 734 |
# File 'bedrock/cfn_prompt.rb', line 732 def text @text end |
Class Method Details
.jsii_properties ⇒ Object
734 735 736 737 738 739 |
# File 'bedrock/cfn_prompt.rb', line 734 def self.jsii_properties { :cache_point => "cachePoint", :text => "text", } end |
Instance Method Details
#to_jsii ⇒ Object
741 742 743 744 745 746 747 748 |
# File 'bedrock/cfn_prompt.rb', line 741 def to_jsii result = {} result.merge!({ "cachePoint" => @cache_point, "text" => @text, }) result.compact end |