我收到错误:
An error has occurred: Invalid Lambda Response: Received error response from Lambda: Handled.
从我的lambda函数的lex中,我正在尝试https://github.com/awslabs/amz-ai-building-better-bots中的代码,
在尝试测试事件时,Lambda函数将返回下面的预期输出,指示lex引发下一个插槽,但是lex抛出上述错误。
Lambda测试输出:
{
"sessionAttributes": {},
"dialogAction": {
"type": "ElicitSlot",
"intentName": "cafeOrderBeverageIntent",
"slots": {
"BeverageType": "mocha",
"BeverageStrength": null,
"Creamer": null,
"BeverageSize": null,
"BeverageTemp": null,
"BeverageExtras": null
},
"slotToElicit": "BeverageSize"
}
}
已查看lex开发人员指南,并且此响应具有输出格式的所有预期字段
是否也应将dialogaction elicitslot发送给“ fulfillmentState”?目前尚未发送。
测试事件输入:
{
"messageVersion": "1.0",
"invocationSource": "DialogCodeHook",
"userId": "test-1",
"sessionAttributes": {},
"bot": {
"name": "CoffeeBot",
"alias": null,
"version": "$LATEST"
},
"outputDialogMode": "Text",
"currentIntent": {
"name": "cafeOrderBeverageIntent",
"slots": {
"BeverageType": "mocha",
"BeverageStrength": null,
"Creamer": null,
"BeverageSize": null,
"BeverageTemp": null,
"BeverageExtras": null
},
"confirmationStatus": "None"
}
}