Class: AWSCDK::Lex::CfnBot::IntentDisambiguationSettingsProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Lex::CfnBot::IntentDisambiguationSettingsProperty
- Defined in:
- lex/cfn_bot.rb
Overview
Configures the Intent Disambiguation feature that helps resolve ambiguous user inputs when multiple intents could match.
When enabled, the system presents clarifying questions to users, helping them specify their exact intent for improved conversation accuracy.
Instance Attribute Summary collapse
-
#custom_disambiguation_message ⇒ String?
readonly
Provides a custom message that will be displayed before presenting the disambiguation options to users.
-
#enabled ⇒ Boolean, AWSCDK::IResolvable
readonly
Determines whether the Intent Disambiguation feature is enabled.
-
#max_disambiguation_intents ⇒ Numeric?
readonly
Specifies the maximum number of intent options (2-5) to present to users when disambiguation is needed.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(enabled:, custom_disambiguation_message: nil, max_disambiguation_intents: nil) ⇒ IntentDisambiguationSettingsProperty
constructor
A new instance of IntentDisambiguationSettingsProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(enabled:, custom_disambiguation_message: nil, max_disambiguation_intents: nil) ⇒ IntentDisambiguationSettingsProperty
Returns a new instance of IntentDisambiguationSettingsProperty.
3451 3452 3453 3454 3455 3456 3457 3458 |
# File 'lex/cfn_bot.rb', line 3451 def initialize(enabled:, custom_disambiguation_message: nil, max_disambiguation_intents: nil) @enabled = enabled Jsii::Type.check_type(@enabled, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "enabled") @custom_disambiguation_message = Jsii::Type.check_type(@custom_disambiguation_message, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "customDisambiguationMessage") unless @custom_disambiguation_message.nil? @max_disambiguation_intents = max_disambiguation_intents Jsii::Type.check_type(@max_disambiguation_intents, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "maxDisambiguationIntents") unless @max_disambiguation_intents.nil? end |
Instance Attribute Details
#custom_disambiguation_message ⇒ String? (readonly)
Provides a custom message that will be displayed before presenting the disambiguation options to users.
This message helps set the context for users and can be customized to match your bot's tone and brand. If not specified, a default message will be used.
3473 3474 3475 |
# File 'lex/cfn_bot.rb', line 3473 def @custom_disambiguation_message end |
#enabled ⇒ Boolean, AWSCDK::IResolvable (readonly)
Determines whether the Intent Disambiguation feature is enabled.
When set to true , Amazon Lex will present disambiguation options to users when multiple intents could match their input, with the default being false .
3466 3467 3468 |
# File 'lex/cfn_bot.rb', line 3466 def enabled @enabled end |
#max_disambiguation_intents ⇒ Numeric? (readonly)
Specifies the maximum number of intent options (2-5) to present to users when disambiguation is needed.
This setting determines how many intent options will be shown to users when the system detects ambiguous input. The default value is 3.
3480 3481 3482 |
# File 'lex/cfn_bot.rb', line 3480 def max_disambiguation_intents @max_disambiguation_intents end |
Class Method Details
.jsii_properties ⇒ Object
3482 3483 3484 3485 3486 3487 3488 |
# File 'lex/cfn_bot.rb', line 3482 def self.jsii_properties { :enabled => "enabled", :custom_disambiguation_message => "customDisambiguationMessage", :max_disambiguation_intents => "maxDisambiguationIntents", } end |
Instance Method Details
#to_jsii ⇒ Object
3490 3491 3492 3493 3494 3495 3496 3497 3498 |
# File 'lex/cfn_bot.rb', line 3490 def to_jsii result = {} result.merge!({ "enabled" => @enabled, "customDisambiguationMessage" => @custom_disambiguation_message, "maxDisambiguationIntents" => @max_disambiguation_intents, }) result.compact end |