在Alexa LaunchRequest上请求的技能响应存在问题

时间:2018-08-23 15:36:43

标签: amazon-web-services alexa alexa-skills-kit alexa-voice-service

我正在尝试调用一项技能,并且收到来自Alexa的“请求的技能响应存在问题”消息。

这是Alexa的请求:

{

   "version": "1.0",

   "session": {

     "new": true,

     "sessionId": "amzn1.echo-api.session.84e6d5c5-6254-43dd-bb28-f3b434b71857",

     "application": {

       "applicationId": "amzn1.ask.skill.db1bac88-183d-409c-9d3e-0e69fa0f5fe2"

     },

     "user": {

       "userId": "amzn1.ask.account.AGX2NO3NXXDS6NLEZMDZXMRZZPJ3DLEERYK7J3NUPFUYRADFB2HRILB7BZVTN336OFVSNFFUP3VDVFHERK5PKQE5H32EQ5GGWTT67EMDQKP22Q7NTXXNYDUTYNCYI6EJUEODQ54VHKW4JSWVCS7JINWLYH2LICQVETFGZBY6NBDJVEX66VCGCZMRTFZYAG2E3IXDPMPVF3U4VMY"

     }

   },

   "context": {

     "System": {

       "application": {

         "applicationId": "amzn1.ask.skill.db1bac88-183d-409c-9d3e-0e69fa0f5fe2"

       },

       "user": {

         "userId": "amzn1.ask.account.AGX2NO3NXXDS6NLEZMDZXMRZZPJ3DLEERYK7J3NUPFUYRADFB2HRILB7BZVTN336OFVSNFFUP3VDVFHERK5PKQE5H32EQ5GGWTT67EMDQKP22Q7NTXXNYDUTYNCYI6EJUEODQ54VHKW4JSWVCS7JINWLYH2LICQVETFGZBY6NBDJVEX66VCGCZMRTFZYAG2E3IXDPMPVF3U4VMY"

       },

       "device": {

         "deviceId": "amzn1.ask.device.AGUTTO7VCXPCUUSXNDCNO6LK7LZHUKPDGZBOXUOBNRNOBGD7FHBJWHOK3LJNQX4U47HTFLUXJ6MHBL6V7UCDNTWOMBJIP5R4R2ZVK3XJX42PEZG6J6TCS3U7NSYZZ3PDCUSH22CY7LYGNIK2MGXCUGR4ITQQ",

         "supportedInterfaces": {}

       },

       "apiEndpoint": "https://api.amazonalexa.com",

       "apiAccessToken": "eyJ0eXAiOiJKV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ywbEuTNI60kaLVEopa9pnbqyQt57UC1JrN0J6ShvvQCH9FBvD0uYCvmcuuQrv5f3JYSVxSqdXuvjVmmzL3xEtpmJyxwu-EnTvXregzD3o2UVEIaIJnCFFf9jv30hupClk1MlAJZQiBYsJBkqCLsxTdrrSzQ"

     }

   },

   "request": {

     "type": "LaunchRequest",

     "requestId": "amzn1.echo-api.request.0c7adbd0-136b-4511-b5cc-2c57e4e8ff60",

     "timestamp": "2018-08-23T14:24:41Z",

     "locale": "en-US",

     "shouldLinkResultBeReturned": false

   }

}

交互模式:

{
    "interactionModel": {
        "languageModel": {
            "invocationName": "speech p o c",
            "intents": [
                {
                    "name": "AMAZON.CancelIntent",
                    "samples": []
                },
                {
                    "name": "AMAZON.HelpIntent",
                    "samples": []
                },
                {
                    "name": "AMAZON.StopIntent",
                    "samples": [
                        "good bye",
                        "i'm done",
                        "thank you i'm done"
                    ]
                },
                {
                    "name": "RawText",
                    "slots": [
                        {
                            "name": "Text",
                            "type": "ABC_Text"
                        }
                    ],
                    "samples": [
                        "{Text}",
                        "ask abc to {Text}"
                    ]
                },
                {
                    "name": "AMAZON.RepeatIntent",
                    "samples": []
                }
            ],
            "types": [
                {
                    "name": "ABC_Text",
                    "values": [
                        {
                            "name": {
                                "value": "how much do i owe"
                            }
                        },
                        {
                            "name": {
                                "value": "how much did i spend on coffee last week"
                            }
                        },
                        {
                            "name": {
                                "value": "hello"
                            }
                        },
                        {
                            "name": {
                                "value": "where is the nearest atm"
                            }
                        }
                    ]
                }
            ]
        }
    }
}

以下是端点信息:

enter image description here

在本地命中相同的端点Webhook可以正常工作并产生预期的响应:

enter image description here 我可能做错了什么?

谢谢。

1 个答案:

答案 0 :(得分:0)

您不能返回纯文本作为Alexa的回复。

使用提到的here

json结构