Class: AWSCDK::Lex::CfnBot::BedrockModelSpecificationProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Lex::CfnBot::BedrockModelSpecificationProperty
- Defined in:
- lex/cfn_bot.rb
Overview
Contains information about the Amazon Bedrock model used to interpret the prompt used in descriptive bot building.
Instance Attribute Summary collapse
- #bedrock_guardrail_configuration ⇒ AWSCDK::IResolvable, ... readonly
- #bedrock_model_custom_prompt ⇒ String? readonly
- #bedrock_trace_status ⇒ String? readonly
-
#model_arn ⇒ String
readonly
The ARN of the foundation model used in descriptive bot building.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(model_arn:, bedrock_guardrail_configuration: nil, bedrock_model_custom_prompt: nil, bedrock_trace_status: nil) ⇒ BedrockModelSpecificationProperty
constructor
A new instance of BedrockModelSpecificationProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(model_arn:, bedrock_guardrail_configuration: nil, bedrock_model_custom_prompt: nil, bedrock_trace_status: nil) ⇒ BedrockModelSpecificationProperty
Returns a new instance of BedrockModelSpecificationProperty.
1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 |
# File 'lex/cfn_bot.rb', line 1231 def initialize(model_arn:, bedrock_guardrail_configuration: nil, bedrock_model_custom_prompt: nil, bedrock_trace_status: nil) @model_arn = model_arn Jsii::Type.check_type(@model_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "modelArn") @bedrock_guardrail_configuration = bedrock_guardrail_configuration.is_a?(Hash) ? ::AWSCDK::Lex::CfnBot::BedrockGuardrailConfigurationProperty.new(**bedrock_guardrail_configuration.transform_keys(&:to_sym)) : bedrock_guardrail_configuration Jsii::Type.check_type(@bedrock_guardrail_configuration, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19sZXguQ2ZuQm90LkJlZHJvY2tHdWFyZHJhaWxDb25maWd1cmF0aW9uUHJvcGVydHkifV19fQ==")), "bedrockGuardrailConfiguration") unless @bedrock_guardrail_configuration.nil? @bedrock_model_custom_prompt = bedrock_model_custom_prompt Jsii::Type.check_type(@bedrock_model_custom_prompt, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "bedrockModelCustomPrompt") unless @bedrock_model_custom_prompt.nil? @bedrock_trace_status = bedrock_trace_status Jsii::Type.check_type(@bedrock_trace_status, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "bedrockTraceStatus") unless @bedrock_trace_status.nil? end |
Instance Attribute Details
#bedrock_guardrail_configuration ⇒ AWSCDK::IResolvable, ... (readonly)
1249 1250 1251 |
# File 'lex/cfn_bot.rb', line 1249 def bedrock_guardrail_configuration @bedrock_guardrail_configuration end |
#bedrock_model_custom_prompt ⇒ String? (readonly)
1252 1253 1254 |
# File 'lex/cfn_bot.rb', line 1252 def bedrock_model_custom_prompt @bedrock_model_custom_prompt end |
#bedrock_trace_status ⇒ String? (readonly)
1255 1256 1257 |
# File 'lex/cfn_bot.rb', line 1255 def bedrock_trace_status @bedrock_trace_status end |
#model_arn ⇒ String (readonly)
The ARN of the foundation model used in descriptive bot building.
1246 1247 1248 |
# File 'lex/cfn_bot.rb', line 1246 def model_arn @model_arn end |
Class Method Details
.jsii_properties ⇒ Object
1257 1258 1259 1260 1261 1262 1263 1264 |
# File 'lex/cfn_bot.rb', line 1257 def self.jsii_properties { :model_arn => "modelArn", :bedrock_guardrail_configuration => "bedrockGuardrailConfiguration", :bedrock_model_custom_prompt => "bedrockModelCustomPrompt", :bedrock_trace_status => "bedrockTraceStatus", } end |
Instance Method Details
#to_jsii ⇒ Object
1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 |
# File 'lex/cfn_bot.rb', line 1266 def to_jsii result = {} result.merge!({ "modelArn" => @model_arn, "bedrockGuardrailConfiguration" => @bedrock_guardrail_configuration, "bedrockModelCustomPrompt" => @bedrock_model_custom_prompt, "bedrockTraceStatus" => @bedrock_trace_status, }) result.compact end |