Class: AWSCDK::Lex::CfnBot::NluImprovementSpecificationProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
lex/cfn_bot.rb

Overview

Configures the Assisted Natural Language Understanding (NLU) feature for your bot.

This specification determines whether enhanced intent recognition and utterance understanding capabilities are active.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(enabled:, assisted_nlu_mode: nil, intent_disambiguation_settings: nil) ⇒ NluImprovementSpecificationProperty

Returns a new instance of NluImprovementSpecificationProperty.

Parameters:



4011
4012
4013
4014
4015
4016
4017
4018
# File 'lex/cfn_bot.rb', line 4011

def initialize(enabled:, assisted_nlu_mode: nil, intent_disambiguation_settings: nil)
  @enabled = enabled
  Jsii::Type.check_type(@enabled, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "enabled")
  @assisted_nlu_mode = assisted_nlu_mode
  Jsii::Type.check_type(@assisted_nlu_mode, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "assistedNluMode") unless @assisted_nlu_mode.nil?
  @intent_disambiguation_settings = intent_disambiguation_settings.is_a?(Hash) ? ::AWSCDK::Lex::CfnBot::IntentDisambiguationSettingsProperty.new(**intent_disambiguation_settings.transform_keys(&:to_sym)) : intent_disambiguation_settings
  Jsii::Type.check_type(@intent_disambiguation_settings, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19sZXguQ2ZuQm90LkludGVudERpc2FtYmlndWF0aW9uU2V0dGluZ3NQcm9wZXJ0eSJ9XX19")), "intentDisambiguationSettings") unless @intent_disambiguation_settings.nil?
end

Instance Attribute Details

#assisted_nlu_modeString? (readonly)

Specifies the mode for Assisted NLU operation.

Use Primary to make Assisted NLU the primary intent recognition method, or Fallback to use it only when standard NLU confidence is low.



4033
4034
4035
# File 'lex/cfn_bot.rb', line 4033

def assisted_nlu_mode
  @assisted_nlu_mode
end

#enabledBoolean, AWSCDK::IResolvable (readonly)

Determines whether the Assisted NLU feature is enabled for the bot.

When set to true , Amazon Lex uses advanced models to improve intent recognition and slot resolution, with the default being false .



4026
4027
4028
# File 'lex/cfn_bot.rb', line 4026

def enabled
  @enabled
end

#intent_disambiguation_settingsAWSCDK::IResolvable, ... (readonly)

An object containing specifications for the Intent Disambiguation feature within the Assisted NLU settings.

These settings determine how the bot handles ambiguous user inputs that could match multiple intents.



4040
4041
4042
# File 'lex/cfn_bot.rb', line 4040

def intent_disambiguation_settings
  @intent_disambiguation_settings
end

Class Method Details

.jsii_propertiesObject



4042
4043
4044
4045
4046
4047
4048
# File 'lex/cfn_bot.rb', line 4042

def self.jsii_properties
  {
    :enabled => "enabled",
    :assisted_nlu_mode => "assistedNluMode",
    :intent_disambiguation_settings => "intentDisambiguationSettings",
  }
end

Instance Method Details

#to_jsiiObject



4050
4051
4052
4053
4054
4055
4056
4057
4058
# File 'lex/cfn_bot.rb', line 4050

def to_jsii
  result = {}
  result.merge!({
    "enabled" => @enabled,
    "assistedNluMode" => @assisted_nlu_mode,
    "intentDisambiguationSettings" => @intent_disambiguation_settings,
  })
  result.compact
end