Skip to content

Commit 564f7af

Browse files
author
AWS
committed
Amazon Lex Model Building Service Update: Amazon Lex supports managing input and output contexts as well as default values for slots.
1 parent 6d967a0 commit 564f7af

File tree

2 files changed

+145
-2
lines changed

2 files changed

+145
-2
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"type": "feature",
3+
"category": "Amazon Lex Model Building Service",
4+
"contributor": "",
5+
"description": "Amazon Lex supports managing input and output contexts as well as default values for slots."
6+
}

services/lexmodelbuilding/src/main/resources/codegen-resources/service-2.json

Lines changed: 139 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -979,6 +979,16 @@
979979
"CustomPayload"
980980
]
981981
},
982+
"ContextTimeToLiveInSeconds":{
983+
"type":"integer",
984+
"max":86400,
985+
"min":5
986+
},
987+
"ContextTurnsToLive":{
988+
"type":"integer",
989+
"max":20,
990+
"min":1
991+
},
982992
"ConversationLogsRequest":{
983993
"type":"structure",
984994
"required":[
@@ -1183,6 +1193,14 @@
11831193
"kendraConfiguration":{
11841194
"shape":"KendraConfiguration",
11851195
"documentation":"<p>Configuration information, if any, for connecting an Amazon Kendra index with the <code>AMAZON.KendraSearchIntent</code> intent.</p>"
1196+
},
1197+
"inputContexts":{
1198+
"shape":"InputContextList",
1199+
"documentation":"<p>An array of <code>InputContext</code> objects that lists the contexts that must be active for Amazon Lex to choose the intent in a conversation with the user.</p>"
1200+
},
1201+
"outputContexts":{
1202+
"shape":"OutputContextList",
1203+
"documentation":"<p>An array of <code>OutputContext</code> objects that lists the contexts that the intent activates when the intent is fulfilled.</p>"
11861204
}
11871205
}
11881206
},
@@ -2216,6 +2234,14 @@
22162234
"kendraConfiguration":{
22172235
"shape":"KendraConfiguration",
22182236
"documentation":"<p>Configuration information, if any, to connect to an Amazon Kendra index with the <code>AMAZON.KendraSearchIntent</code> intent.</p>"
2237+
},
2238+
"inputContexts":{
2239+
"shape":"InputContextList",
2240+
"documentation":"<p>An array of <code>InputContext</code> objects that lists the contexts that must be active for Amazon Lex to choose the intent in a conversation with the user.</p>"
2241+
},
2242+
"outputContexts":{
2243+
"shape":"OutputContextList",
2244+
"documentation":"<p>An array of <code>OutputContext</code> objects that lists the contexts that the intent activates when the intent is fulfilled.</p>"
22192245
}
22202246
}
22212247
},
@@ -2492,6 +2518,29 @@
24922518
"FAILED"
24932519
]
24942520
},
2521+
"InputContext":{
2522+
"type":"structure",
2523+
"required":["name"],
2524+
"members":{
2525+
"name":{
2526+
"shape":"InputContextName",
2527+
"documentation":"<p>The name of the context.</p>"
2528+
}
2529+
},
2530+
"documentation":"<p>The name of a context that must be active for an intent to be selected by Amazon Lex.</p>"
2531+
},
2532+
"InputContextList":{
2533+
"type":"list",
2534+
"member":{"shape":"InputContext"},
2535+
"max":5,
2536+
"min":0
2537+
},
2538+
"InputContextName":{
2539+
"type":"string",
2540+
"max":100,
2541+
"min":1,
2542+
"pattern":"^([A-Za-z]_?)+$"
2543+
},
24952544
"Intent":{
24962545
"type":"structure",
24972546
"required":[
@@ -2810,6 +2859,41 @@
28102859
"DEFAULT_OBFUSCATION"
28112860
]
28122861
},
2862+
"OutputContext":{
2863+
"type":"structure",
2864+
"required":[
2865+
"name",
2866+
"timeToLiveInSeconds",
2867+
"turnsToLive"
2868+
],
2869+
"members":{
2870+
"name":{
2871+
"shape":"OutputContextName",
2872+
"documentation":"<p>The name of the context.</p>"
2873+
},
2874+
"timeToLiveInSeconds":{
2875+
"shape":"ContextTimeToLiveInSeconds",
2876+
"documentation":"<p>The number of seconds that the context should be active after it is first sent in a <code>PostContent</code> or <code>PostText</code> response. You can set the value between 5 and 86,400 seconds (24 hours).</p>"
2877+
},
2878+
"turnsToLive":{
2879+
"shape":"ContextTurnsToLive",
2880+
"documentation":"<p>The number of conversation turns that the context should be active. A conversation turn is one <code>PostContent</code> or <code>PostText</code> request and the corresponding response from Amazon Lex.</p>"
2881+
}
2882+
},
2883+
"documentation":"<p>The specification of an output context that is set when an intent is fulfilled.</p>"
2884+
},
2885+
"OutputContextList":{
2886+
"type":"list",
2887+
"member":{"shape":"OutputContext"},
2888+
"max":10,
2889+
"min":0
2890+
},
2891+
"OutputContextName":{
2892+
"type":"string",
2893+
"max":100,
2894+
"min":1,
2895+
"pattern":"^([A-Za-z]_?)+$"
2896+
},
28132897
"PreconditionFailedException":{
28142898
"type":"structure",
28152899
"members":{
@@ -2965,11 +3049,11 @@
29653049
},
29663050
"enableModelImprovements":{
29673051
"shape":"Boolean",
2968-
"documentation":"<p>Set to <code>true</code> to enable access to natural language understanding improvements. </p> <p>When you set the <code>enableModelImprovements</code> parameter to <code>true</code> you can use the <code>nluIntentConfidenceThreshold</code> parameter to configure confidence scores. For more information, see <a href=\"https://docs.aws.amazon.com/lex/latest/dg/confidence-scores.html\">Confidence Scores</a>.</p> <p>You can only set the <code>enableModelImprovements</code> parameter in certain Regions. If you set the parameter to <code>true</code>, your bot has access to accuracy improvements.</p> <p>The Regions where you can set the <code>enableModelImprovements</code> parameter to <code>true</code> are:</p> <ul> <li> <p>US East (N. Virginia) (us-east-1)</p> </li> <li> <p>US West (Oregon) (us-west-2)</p> </li> <li> <p>Asia Pacific (Sydney) (ap-southeast-2)</p> </li> <li> <p>EU (Ireland) (eu-west-1)</p> </li> </ul> <p>In other Regions, the <code>enableModelImprovements</code> parameter is set to <code>true</code> by default. In these Regions setting the parameter to <code>false</code> throws a <code>ValidationException</code> exception.</p> <ul> <li> <p>Asia Pacific (Singapore) (ap-southeast-1)</p> </li> <li> <p>Asia Pacific (Tokyo) (ap-northeast-1)</p> </li> <li> <p>EU (Frankfurt) (eu-central-1)</p> </li> <li> <p>EU (London) (eu-west-2)</p> </li> </ul>"
3052+
"documentation":"<p>Set to <code>true</code> to enable access to natural language understanding improvements. </p> <p>When you set the <code>enableModelImprovements</code> parameter to <code>true</code> you can use the <code>nluIntentConfidenceThreshold</code> parameter to configure confidence scores. For more information, see <a href=\"https://docs.aws.amazon.com/lex/latest/dg/confidence-scores.html\">Confidence Scores</a>.</p> <p>You can only set the <code>enableModelImprovements</code> parameter in certain Regions. If you set the parameter to <code>true</code>, your bot has access to accuracy improvements.</p> <p>The Regions where you can set the <code>enableModelImprovements</code> parameter to <code>true</code> are:</p> <ul> <li> <p>US East (N. Virginia) (us-east-1)</p> </li> <li> <p>US West (Oregon) (us-west-2)</p> </li> <li> <p>Asia Pacific (Sydney) (ap-southeast-2)</p> </li> <li> <p>EU (Ireland) (eu-west-1)</p> </li> </ul> <p>In other Regions, the <code>enableModelImprovements</code> parameter is set to <code>true</code> by default. In these Regions setting the parameter to <code>false</code> throws a <code>ValidationException</code> exception.</p>"
29693053
},
29703054
"nluIntentConfidenceThreshold":{
29713055
"shape":"ConfidenceThreshold",
2972-
"documentation":"<p>Determines the threshold where Amazon Lex will insert the <code>AMAZON.FallbackIntent</code>, <code>AMAZON.KendraSearchIntent</code>, or both when returning alternative intents in a <a href=\"https://docs.aws.amazon.com/lex/latest/dg/API_runtime_PostContent.html\">PostContent</a> or <a href=\"https://docs.aws.amazon.com/lex/latest/dg/API_runtime_PostText.html\">PostText</a> response. <code>AMAZON.FallbackIntent</code> and <code>AMAZON.KendraSearchIntent</code> are only inserted if they are configured for the bot.</p> <p>You must set the <code>enableModelImprovements</code> parameter to <code>true</code> to use confidence scores.</p> <ul> <li> <p>US East (N. Virginia) (us-east-1)</p> </li> <li> <p>US West (Oregon) (us-west-2)</p> </li> <li> <p>Asia Pacific (Sydney) (ap-southeast-2)</p> </li> <li> <p>EU (Ireland) (eu-west-1)</p> </li> </ul> <p>In other Regions, the <code>enableModelImprovements</code> parameter is set to <code>true</code> by default.</p> <p>For example, suppose a bot is configured with the confidence threshold of 0.80 and the <code>AMAZON.FallbackIntent</code>. Amazon Lex returns three alternative intents with the following confidence scores: IntentA (0.70), IntentB (0.60), IntentC (0.50). The response from the <code>PostText</code> operation would be:</p> <ul> <li> <p>AMAZON.FallbackIntent</p> </li> <li> <p>IntentA</p> </li> <li> <p>IntentB</p> </li> <li> <p>IntentC</p> </li> </ul>"
3056+
"documentation":"<p>Determines the threshold where Amazon Lex will insert the <code>AMAZON.FallbackIntent</code>, <code>AMAZON.KendraSearchIntent</code>, or both when returning alternative intents in a <a href=\"https://docs.aws.amazon.com/lex/latest/dg/API_runtime_PostContent.html\">PostContent</a> or <a href=\"https://docs.aws.amazon.com/lex/latest/dg/API_runtime_PostText.html\">PostText</a> response. <code>AMAZON.FallbackIntent</code> and <code>AMAZON.KendraSearchIntent</code> are only inserted if they are configured for the bot.</p> <p>You must set the <code>enableModelImprovements</code> parameter to <code>true</code> to use confidence scores in the following regions.</p> <ul> <li> <p>US East (N. Virginia) (us-east-1)</p> </li> <li> <p>US West (Oregon) (us-west-2)</p> </li> <li> <p>Asia Pacific (Sydney) (ap-southeast-2)</p> </li> <li> <p>EU (Ireland) (eu-west-1)</p> </li> </ul> <p>In other Regions, the <code>enableModelImprovements</code> parameter is set to <code>true</code> by default.</p> <p>For example, suppose a bot is configured with the confidence threshold of 0.80 and the <code>AMAZON.FallbackIntent</code>. Amazon Lex returns three alternative intents with the following confidence scores: IntentA (0.70), IntentB (0.60), IntentC (0.50). The response from the <code>PostText</code> operation would be:</p> <ul> <li> <p>AMAZON.FallbackIntent</p> </li> <li> <p>IntentA</p> </li> <li> <p>IntentB</p> </li> <li> <p>IntentC</p> </li> </ul>"
29733057
},
29743058
"clarificationPrompt":{
29753059
"shape":"Prompt",
@@ -3163,6 +3247,14 @@
31633247
"kendraConfiguration":{
31643248
"shape":"KendraConfiguration",
31653249
"documentation":"<p>Configuration information required to use the <code>AMAZON.KendraSearchIntent</code> intent to connect to an Amazon Kendra index. For more information, see <a href=\"http://docs.aws.amazon.com/lex/latest/dg/built-in-intent-kendra-search.html\"> AMAZON.KendraSearchIntent</a>.</p>"
3250+
},
3251+
"inputContexts":{
3252+
"shape":"InputContextList",
3253+
"documentation":"<p>An array of <code>InputContext</code> objects that lists the contexts that must be active for Amazon Lex to choose the intent in a conversation with the user.</p>"
3254+
},
3255+
"outputContexts":{
3256+
"shape":"OutputContextList",
3257+
"documentation":"<p>An array of <code>OutputContext</code> objects that lists the contexts that the intent activates when the intent is fulfilled.</p>"
31663258
}
31673259
}
31683260
},
@@ -3236,6 +3328,14 @@
32363328
"kendraConfiguration":{
32373329
"shape":"KendraConfiguration",
32383330
"documentation":"<p>Configuration information, if any, required to connect to an Amazon Kendra index and use the <code>AMAZON.KendraSearchIntent</code> intent.</p>"
3331+
},
3332+
"inputContexts":{
3333+
"shape":"InputContextList",
3334+
"documentation":"<p>An array of <code>InputContext</code> objects that lists the contexts that must be active for Amazon Lex to choose the intent in a conversation with the user.</p>"
3335+
},
3336+
"outputContexts":{
3337+
"shape":"OutputContextList",
3338+
"documentation":"<p>An array of <code>OutputContext</code> objects that lists the contexts that the intent activates when the intent is fulfilled.</p>"
32393339
}
32403340
}
32413341
},
@@ -3444,6 +3544,10 @@
34443544
"obfuscationSetting":{
34453545
"shape":"ObfuscationSetting",
34463546
"documentation":"<p>Determines whether a slot is obfuscated in conversation logs and stored utterances. When you obfuscate a slot, the value is replaced by the slot name in curly braces ({}). For example, if the slot name is \"full_name\", obfuscated values are replaced with \"{full_name}\". For more information, see <a href=\"https://docs.aws.amazon.com/lex/latest/dg/how-obfuscate.html\"> Slot Obfuscation </a>. </p>"
3547+
},
3548+
"defaultValueSpec":{
3549+
"shape":"SlotDefaultValueSpec",
3550+
"documentation":"<p>A list of default values for the slot. Default values are used when Amazon Lex hasn't determined a value for a slot. You can specify default values from context variables, session attributes, and defined values.</p>"
34473551
}
34483552
},
34493553
"documentation":"<p>Identifies the version of a specific slot.</p>"
@@ -3455,6 +3559,39 @@
34553559
"Optional"
34563560
]
34573561
},
3562+
"SlotDefaultValue":{
3563+
"type":"structure",
3564+
"required":["defaultValue"],
3565+
"members":{
3566+
"defaultValue":{
3567+
"shape":"SlotDefaultValueString",
3568+
"documentation":"<p>The default value for the slot. You can specify one of the following:</p> <ul> <li> <p> <code>#context-name.slot-name</code> - The slot value \"slot-name\" in the context \"context-name.\"</p> </li> <li> <p> <code>{attribute}</code> - The slot value of the session attribute \"attribute.\"</p> </li> <li> <p> <code>'value'</code> - The discrete value \"value.\"</p> </li> </ul>"
3569+
}
3570+
},
3571+
"documentation":"<p>A default value for a slot.</p>"
3572+
},
3573+
"SlotDefaultValueList":{
3574+
"type":"list",
3575+
"member":{"shape":"SlotDefaultValue"},
3576+
"max":10,
3577+
"min":0
3578+
},
3579+
"SlotDefaultValueSpec":{
3580+
"type":"structure",
3581+
"required":["defaultValueList"],
3582+
"members":{
3583+
"defaultValueList":{
3584+
"shape":"SlotDefaultValueList",
3585+
"documentation":"<p>The default values for a slot. You can specify more than one default. For example, you can specify a default value to use from a matching context variable, a session attribute, or a fixed value.</p> <p>The default value chosen is selected based on the order that you specify them in the list. For example, if you specify a context variable and a fixed value in that order, Amazon Lex uses the context variable if it is available, else it uses the fixed value.</p>"
3586+
}
3587+
},
3588+
"documentation":"<p>Contains the default values for a slot. Default values are used when Amazon Lex hasn't determined a value for a slot.</p>"
3589+
},
3590+
"SlotDefaultValueString":{
3591+
"type":"string",
3592+
"max":202,
3593+
"min":1
3594+
},
34583595
"SlotList":{
34593596
"type":"list",
34603597
"member":{"shape":"Slot"},

0 commit comments

Comments
 (0)