我正在尝试使用Alexa sill set开发自定义技能 . 在模拟器中进行测试时,当输入样本话语时,它能够访问API endpoints . 但我无法在发送到我的API endpoints 的请求正文(见下文)中找到用户表达式(用户已说过) . 就像我还需要用户在alexa触发回退意图时所说的内容 . 有没有办法我们也可以将用户语音文本发送到我的 endpoints (这样我就可以将该文本发送到LUIS / api.ai) . 我用google助手(google上的操作)检查了同样的事情,它将用户语音文本发送到API endpoints .
{
"version":"1.0",
"session":{
"new":false,
"sessionId":"amzn1.echo-api.session.xxxxxxxxxxxxxx-6de9eeb174c5",
"application":{
"applicationId":"amzn1.ask.skill.xxxxxxxxxxxxxxxxx"
},
"attributes":{
"key":null
},
"user":{
"userId":"amzn1.ask.account.AG4ZW2AIRMFQEPZFLxxxxxxxxxxxxxxxxxxxxxxx"
}
},
"context":{
"System":{
"application":{
"applicationId":"amzn1.ask.skill.xxxxxxxxxxxxx"
},
"user":{
"userId":"amzn1.ask.account.xxxxxxxxxxxxxxxxx"
},
"device":{
"deviceId":"amzn1.ask.device.xxxxxxxxxxxxxxxxxxxxxxxx",
"supportedInterfaces":{
}
},
"apiEndpoint":"https://api.amazonalexa.com",
"apiAccessToken":"eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzxxxxxxxxxxxxxxxxxxxxxxxxx"
}
},
"request":{
"type":"IntentRequest",
"requestId":"amzn1.echo-api.request.28fd7f8b-ef02-4b64-8758-edaecbd0a92b",
"timestamp":"2018-06-25T07:32:13Z",
"locale":"en-US",
"intent":{
"name":"GetWeather",
"confirmationStatus":"NONE",
"slots":{
"City":{
"name":"City",
"value":"New York",
"confirmationStatus":"NONE"
}
}
}
}
}
1 回答
Alexa不在请求JSON中提供用户输入 .
但是,您可以使用slotType创建一个插槽:
SearchQuery
. 这是最灵活的slotType,几乎可以填充用户的全部输入 .AMAZON.SearchQuery:
附注:Amazon Lex是"Powered by the same deep learning technologies as Alexa",Lex does 在请求JSON中提供确切的用户输入 .