【发布时间】:2018-02-14 16:25:43
【问题描述】:
我有一个问题,当我在 Lambda 控制台中运行测试时,我的 lambda 函数正常工作,但在测试模拟器(Beta)中运行相同的代码时却没有。以下是我在这两个地方添加的内容,并对敏感信息进行了编辑:
{
"version": "1.0",
"session": {
"new": false,
"sessionId": "xxxxx",
"application": {
"applicationId": "xxxxx"
},
"user": {
"userId": "xxxxx"
}
},
"context": {
"AudioPlayer": {
"playerActivity": "IDLE"
},
"Display": {
"token": ""
},
"System": {
"application": {
"applicationId": "xxxxx"
},
"user": {
"userId": "xxxxx"
},
"device": {
"deviceId": "xxxxx",
"supportedInterfaces": {
"AudioPlayer": {},
"Display": {
"templateVersion": "1.0",
"markupVersion": "1.0"
}
}
},
"apiEndpoint": "https://api.amazonalexa.com",
"apiAccessToken": "xxxxx"
}
},
"request": {
"type": "IntentRequest",
"requestId": "xxxxx",
"timestamp": "2018-02-13T05:22:11Z",
"locale": "en-US",
"intent": {
"name": "OpenTicketIntent",
"confirmationStatus": "NONE",
"slots": {
"Project": {
"name": "Project",
"confirmationStatus": "NONE"
},
"Assignee": {
"name": "Assignee",
"confirmationStatus": "NONE"
},
"TicketType": {
"name": "TicketType",
"value": "bug",
"resolutions": {
"resolutionsPerAuthority": [
{
"authority": "xxxxx",
"status": {
"code": "ER_SUCCESS_MATCH"
},
"values": [
{
"value": {
"name": "Bug",
"id": "xxxxx"
}
}
]
}
]
},
"confirmationStatus": "NONE"
},
"IssueTitle": {
"name": "IssueTitle",
"confirmationStatus": "NONE"
}
}
},
"dialogState": "STARTED"
}
}
当我要求我的技能在模拟器中自行打开时,它会完美打开。我得到了正确的回应。但是当我之后问它一个问题(“打开一个错误”,以及我在我的对话模型中的许多变体)时,我得到“请求的技能的响应有问题”。难道我做错了什么?除非我使用物理设备,否则这不会起作用吗?
【问题讨论】:
-
您提供的 JSON 是 Alexa 请求,而不是 Alexa 响应。如果你把它寄回去,她不会明白的。你能发布你用来发送响应的代码吗?
标签: alexa alexa-skills-kit alexa-skill