获取“无效的Lambda响应:收到来自Lambda的错误响应:已处理”错误

时间:2019-04-17 11:21:25

标签: node.js amazon-web-services aws-lambda aws-lex

我收到错误:

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"
  }
}

enter image description here

0 个答案:

没有答案