SlotValueSelectionSettingProperty Struct
Contains settings used by Amazon Lex to select a slot value.
| Source | |
|---|---|
| Type last changed |
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_lex as lex } from 'aws-cdk-lib';
const slotValueSelectionSettingProperty: lex.CfnBot.SlotValueSelectionSettingProperty = {
resolutionStrategy: 'resolutionStrategy',
// the properties below are optional
advancedRecognitionSetting: {
audioRecognitionStrategy: 'audioRecognitionStrategy',
},
regexFilter: {
pattern: 'pattern',
},
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_lex as lex
slot_value_selection_setting_property = lex.CfnBot.SlotValueSelectionSettingProperty(
resolution_strategy="resolutionStrategy",
# the properties below are optional
advanced_recognition_setting=lex.CfnBot.AdvancedRecognitionSettingProperty(
audio_recognition_strategy="audioRecognitionStrategy"
),
regex_filter=lex.CfnBot.SlotValueRegexFilterProperty(
pattern="pattern"
)
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.lex.*;
SlotValueSelectionSettingProperty slotValueSelectionSettingProperty = SlotValueSelectionSettingProperty.builder()
.resolutionStrategy("resolutionStrategy")
// the properties below are optional
.advancedRecognitionSetting(AdvancedRecognitionSettingProperty.builder()
.audioRecognitionStrategy("audioRecognitionStrategy")
.build())
.regexFilter(SlotValueRegexFilterProperty.builder()
.pattern("pattern")
.build())
.build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Lex;
var slotValueSelectionSettingProperty = new SlotValueSelectionSettingProperty {
ResolutionStrategy = "resolutionStrategy",
// the properties below are optional
AdvancedRecognitionSetting = new AdvancedRecognitionSettingProperty {
AudioRecognitionStrategy = "audioRecognitionStrategy"
},
RegexFilter = new SlotValueRegexFilterProperty {
Pattern = "pattern"
}
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
slotValueSelectionSettingProperty := &SlotValueSelectionSettingProperty{
ResolutionStrategy: jsii.String("resolutionStrategy"),
// the properties below are optional
AdvancedRecognitionSetting: &AdvancedRecognitionSettingProperty{
AudioRecognitionStrategy: jsii.String("audioRecognitionStrategy"),
},
RegexFilter: &SlotValueRegexFilterProperty{
Pattern: jsii.String("pattern"),
},
}
Properties
advancedRecognitionSettingoptionalIResolvable | CfnBot.advanced_recognition_settingoptionaltyping.Union[IResolvable, AdvancedRecognitionSettingProperty]advancedRecognitionSettingoptionalIResolvableAdvancedRecognitionSettingoptionalIResolvableAdvancedRecognitionSettingoptionalinterface{} #Provides settings that enable advanced recognition settings for slot values.
You can use this to enable using slot values as a custom vocabulary for recognizing user utterances.
regexFilteroptionalIResolvable | CfnBot.regex_filteroptionaltyping.Union[IResolvable, SlotValueRegexFilterProperty]regexFilteroptionalIResolvableRegexFilteroptionalIResolvableRegexFilteroptionalinterface{} #A regular expression used to validate the value of a slot.
resolutionStrategystringresolution_strategystrresolutionStrategyStringResolutionStrategystringResolutionStrategy*string required #Determines the slot resolution strategy that Amazon Lex uses to return slot type values.
notes
The field can be set to one of the following values:
ORIGINAL_VALUE- Returns the value entered by the user, if the user value is similar to the slot value.TOP_RESOLUTION- If there is a resolution list for the slot, return the first value in the resolution list as the slot type value. If there is no resolution list, null is returned.
If you don't specify the valueSelectionStrategy , the default is ORIGINAL_VALUE .