Class: AWSCDK::Bedrock::CfnPrompt::SystemContentBlockProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Bedrock::CfnPrompt::SystemContentBlockProperty
- Defined in:
- bedrock/cfn_prompt.rb
Overview
Contains configurations for instructions to provide the model for how to handle input.
To learn more, see Using the Converse API .
Instance Attribute Summary collapse
-
#cache_point ⇒ AWSCDK::IResolvable, ...
readonly
CachePoint to include in the system prompt.
-
#text ⇒ String?
readonly
A system prompt for the model.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(cache_point: nil, text: nil) ⇒ SystemContentBlockProperty
constructor
A new instance of SystemContentBlockProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(cache_point: nil, text: nil) ⇒ SystemContentBlockProperty
Returns a new instance of SystemContentBlockProperty.
1244 1245 1246 1247 1248 1249 |
# File 'bedrock/cfn_prompt.rb', line 1244 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 system prompt.
1255 1256 1257 |
# File 'bedrock/cfn_prompt.rb', line 1255 def cache_point @cache_point end |
#text ⇒ String? (readonly)
A system prompt for the model.
1260 1261 1262 |
# File 'bedrock/cfn_prompt.rb', line 1260 def text @text end |
Class Method Details
.jsii_properties ⇒ Object
1262 1263 1264 1265 1266 1267 |
# File 'bedrock/cfn_prompt.rb', line 1262 def self.jsii_properties { :cache_point => "cachePoint", :text => "text", } end |
Instance Method Details
#to_jsii ⇒ Object
1269 1270 1271 1272 1273 1274 1275 1276 |
# File 'bedrock/cfn_prompt.rb', line 1269 def to_jsii result = {} result.merge!({ "cachePoint" => @cache_point, "text" => @text, }) result.compact end |