Skip to content

Commit ff92759

Browse files
author
AWS
committed
Amazon Lex Runtime V2 Update: This release adds support for sending hints to Amazon Lex V2 runtime APIs. Bot developers can provide runtime hints to help improve the recognition of slot values.
1 parent 9acbe98 commit ff92759

File tree

2 files changed

+70
-1
lines changed

2 files changed

+70
-1
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 Runtime V2",
4+
"contributor": "",
5+
"description": "This release adds support for sending hints to Amazon Lex V2 runtime APIs. Bot developers can provide runtime hints to help improve the recognition of slot values."
6+
}

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

Lines changed: 64 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -760,6 +760,12 @@
760760
"member":{"shape":"Message"},
761761
"max":10
762762
},
763+
"Name":{
764+
"type":"string",
765+
"max":100,
766+
"min":1,
767+
"pattern":"^([0-9a-zA-Z][_-]?)+$"
768+
},
763769
"NonEmptyString":{
764770
"type":"string",
765771
"min":1
@@ -1111,6 +1117,49 @@
11111117
"error":{"httpStatusCode":404},
11121118
"exception":true
11131119
},
1120+
"RuntimeHintDetails":{
1121+
"type":"structure",
1122+
"required":["runtimeHintValues"],
1123+
"members":{
1124+
"runtimeHintValues":{
1125+
"shape":"RuntimeHintValuesList",
1126+
"documentation":"<p>One or more strings that Amazon Lex V2 should look for in the input to the bot. Each phrase is given preference when deciding on slot values.</p>"
1127+
}
1128+
},
1129+
"documentation":"<p>Provides an array of phrases that should be given preference when resolving values for a slot.</p>"
1130+
},
1131+
"RuntimeHintPhrase":{
1132+
"type":"string",
1133+
"max":140,
1134+
"min":1
1135+
},
1136+
"RuntimeHintValue":{
1137+
"type":"structure",
1138+
"required":["phrase"],
1139+
"members":{
1140+
"phrase":{
1141+
"shape":"RuntimeHintPhrase",
1142+
"documentation":"<p>The phrase that Amazon Lex V2 should look for in the user's input to the bot.</p>"
1143+
}
1144+
},
1145+
"documentation":"<p>Provides the phrase that Amazon Lex V2 should look for in the user's input to the bot.</p>"
1146+
},
1147+
"RuntimeHintValuesList":{
1148+
"type":"list",
1149+
"member":{"shape":"RuntimeHintValue"},
1150+
"max":100,
1151+
"min":1
1152+
},
1153+
"RuntimeHints":{
1154+
"type":"structure",
1155+
"members":{
1156+
"slotHints":{
1157+
"shape":"SlotHintsIntentMap",
1158+
"documentation":"<p>A list of the slots in the intent that should have runtime hints added, and the phrases that should be added for each slot.</p> <p>The first level of the <code>slotHints</code> map is the name of the intent. The second level is the name of the slot within the intent. For more information, see <a href=\"https://docs.aws.amazon.com/lexv2/latest/dg/using-hints.xml\">Using hints to improve accuracy</a>.</p> <p>The intent name and slot name must exist.</p>"
1159+
}
1160+
},
1161+
"documentation":"<p>You can provide Amazon Lex V2 with hints to the phrases that a customer is likely to use for a slot. When a slot with hints is resolved, the phrases in the runtime hints are preferred in the resolution. You can provide hints for a maximum of 100 intents. You can provide a maximum of 100 slots.</p> <p>Before you can use runtime hints with an existing bot, you must first rebuild the bot.</p> <p>For more information, see <a href=\"https://docs.aws.amazon.com/lexv2/latest/dg/using-hints.xml\">Using hints to improve accuracy</a>.</p>"
1162+
},
11141163
"SensitiveNonEmptyString":{
11151164
"type":"string",
11161165
"sensitive":true
@@ -1184,7 +1233,11 @@
11841233
},
11851234
"originatingRequestId":{
11861235
"shape":"NonEmptyString",
1187-
"documentation":"<p/>"
1236+
"documentation":"<p>A unique identifier for a specific request.</p>"
1237+
},
1238+
"runtimeHints":{
1239+
"shape":"RuntimeHints",
1240+
"documentation":"<p>Hints for phrases that a customer is likely to use for a slot. Amazon Lex V2 uses the hints to help determine the correct value of a slot.</p>"
11881241
}
11891242
},
11901243
"documentation":"<p>The state of the user's session with Amazon Lex V2.</p>"
@@ -1214,6 +1267,16 @@
12141267
},
12151268
"documentation":"<p>A value that Amazon Lex V2 uses to fulfill an intent. </p>"
12161269
},
1270+
"SlotHintsIntentMap":{
1271+
"type":"map",
1272+
"key":{"shape":"Name"},
1273+
"value":{"shape":"SlotHintsSlotMap"}
1274+
},
1275+
"SlotHintsSlotMap":{
1276+
"type":"map",
1277+
"key":{"shape":"Name"},
1278+
"value":{"shape":"RuntimeHintDetails"}
1279+
},
12171280
"Slots":{
12181281
"type":"map",
12191282
"key":{"shape":"NonEmptyString"},

0 commit comments

Comments
 (0)