Class: AWSCDK::Bedrock::CfnPrompt::SystemContentBlockProperty

Inherits:
Jsii::Struct
  • Object
show all
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

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(cache_point: nil, text: nil) ⇒ SystemContentBlockProperty

Returns a new instance of SystemContentBlockProperty.

Parameters:



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_pointAWSCDK::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

#textString? (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_propertiesObject



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_jsiiObject



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