Class: AWSCDK::Lex::CfnBot::IntentDisambiguationSettingsProperty

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

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(enabled:, custom_disambiguation_message: nil, max_disambiguation_intents: nil) ⇒ IntentDisambiguationSettingsProperty

Returns a new instance of IntentDisambiguationSettingsProperty.

Parameters:

  • enabled (Boolean, AWSCDK::IResolvable)

    Determines whether the Intent Disambiguation feature is enabled.

  • custom_disambiguation_message (String, nil) (defaults to: nil)

    Provides a custom message that will be displayed before presenting the disambiguation options to users.

  • max_disambiguation_intents (Numeric, nil) (defaults to: nil)

    Specifies the maximum number of intent options (2-5) to present to users when disambiguation is needed.



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 = 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_messageString? (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
  @custom_disambiguation_message
end

#enabledBoolean, 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_intentsNumeric? (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_propertiesObject



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_jsiiObject



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