这是一个非常简单的问题,但我找不到任何答案的证据。我想为我配置一个插槽类型列表——这意味着 Lex 将不得不继续询问该列表中的更多元素。
例如,来回应该是这样的:
Lex: What flowers would you like to order?
Me: roses
Lex: Any other types?
Me: yes, I also want lillies
Lex: Anything else?
Me: that is all
发送到 Lambda 的示例负载如下所示:
{
"currentIntent": {
"slots": {
"PickupDate": "2030-11-08",
"PickupTime": "10:00",
"FlowerType": "lilies"
},
"name": "OrderFlowers",
"confirmationStatus": "None"
},
"bot": {
"alias": "$LATEST",
"version": "$LATEST",
"name": "OrderFlowers"
},
"userId": "John",
"invocationSource": "DialogCodeHook",
"outputDialogMode": "Text",
"messageVersion": "1.0",
"sessionAttributes": {}
}
该 ^^^ 直接取自 AWS Lambda 控制台中的示例测试配置。
我希望它看起来像这样:
{
"currentIntent": {
"slots": {
"PickupDate": "2030-11-08",
"PickupTime": "10:00",
"FlowerTypes": [
"roses",
"lilies"
]
},
"name": "OrderFlowers",
"confirmationStatus": "None"
},
"bot": {
"alias": "$LATEST",
"version": "$LATEST",
"name": "OrderFlowers"
},
"userId": "John",
"invocationSource": "DialogCodeHook",
"outputDialogMode": "Text",
"messageVersion": "1.0",
"sessionAttributes": {}
}