Class: AWSCDK::Bedrock::CfnPromptVersion::SystemContentBlockProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
bedrock/cfn_prompt_version.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:



1237
1238
1239
1240
1241
1242
# File 'bedrock/cfn_prompt_version.rb', line 1237

def initialize(cache_point: nil, text: nil)
  @cache_point = cache_point.is_a?(Hash) ? ::AWSCDK::Bedrock::CfnPromptVersion::CachePointBlockProperty.new(**cache_point.transform_keys(&:to_sym)) : cache_point
  Jsii::Type.check_type(@cache_point, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19iZWRyb2NrLkNmblByb21wdFZlcnNpb24uQ2FjaGVQb2ludEJsb2NrUHJvcGVydHkifV19fQ==")), "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.



1248
1249
1250
# File 'bedrock/cfn_prompt_version.rb', line 1248

def cache_point
  @cache_point
end

#textString? (readonly)

A system prompt for the model.



1253
1254
1255
# File 'bedrock/cfn_prompt_version.rb', line 1253

def text
  @text
end

Class Method Details

.jsii_propertiesObject



1255
1256
1257
1258
1259
1260
# File 'bedrock/cfn_prompt_version.rb', line 1255

def self.jsii_properties
  {
    :cache_point => "cachePoint",
    :text => "text",
  }
end

Instance Method Details

#to_jsiiObject



1262
1263
1264
1265
1266
1267
1268
1269
# File 'bedrock/cfn_prompt_version.rb', line 1262

def to_jsii
  result = {}
  result.merge!({
    "cachePoint" => @cache_point,
    "text" => @text,
  })
  result.compact
end