我的新Alexa技能有一个奇怪的问题 . 该技能采用用户输入风味,如自定义插槽中定义的“苦”,“辣”,“甜”,“干”或“酸” . 无论出于何种原因,当我测试“甜”和“辣”时,响应没有插槽的值属性 . 例如,使用关键字“bitter”查询技能会返回:
{
"session": {
"sessionId": "[masked]",
"application": {
"applicationId": "[masked]"
},
"attributes": {},
"user": {
"userId": "[masked]"
},
"new": true
},
"request": {
"type": "IntentRequest",
"requestId": "[masked]",
"locale": "en-US",
"timestamp": "2016-11-07T03:48:53Z",
"intent": {
"name": "GetBerriesByFlavorIntent",
"slots": {
"flavor": {
"name": "flavor",
"value": "bitter"
}
}
}
},
"version": "1.0"
}
请注意,flavor插槽具有属性“value”,这是“苦” . 现在,当我打电话给“甜蜜”或“辣”时,我得到:
{
"session": {
"sessionId": "[masked]",
"application": {
"applicationId": "[masked]"
},
"attributes": {},
"user": {
"userId": "[masked]"
},
"new": true
},
"request": {
"type": "IntentRequest",
"requestId": "[masked]",
"locale": "en-US",
"timestamp": "2016-11-07T03:50:54Z",
"intent": {
"name": "GetBerriesByFlavorIntent",
"slots": {
"flavor": {
"name": "flavor"
}
}
}
},
"version": "1.0"
}
可能导致这种情况发生的任何想法?我可以验证“干”和“酸”也有效,所以很奇怪这两个特定的关键字有这么多麻烦 . 我还可以验证Alexa正确理解单词,因为我在Alexa控制台上进行测试并硬编码与自定义插槽值相同的输入值 .