【发布时间】:2017-06-25 00:04:11
【问题描述】:
我正在尝试为英国邮政编码(例如 CB1 1PT)创建自定义插槽。我设法在 10 月左右完成了这项工作,但是,我回到了这个项目,看起来亚马逊已经更新了很多东西。
这是我的意图架构:
{
"intents": [
{
"intent": "GetOutages",
"slots": [
{
"name": "postcode",
"type": "LIST_OF_POSTCODES"
}
]
},
{
"intent": "GetCoverage",
"slots": [
{
"name": "postcode",
"type": "LIST_OF_POSTCODES"
}
]
},
{
"intent": "AMAZON.StopIntent",
"slots": []
},
{
"intent": "AMAZON.CancelIntent",
"slots": []
}
]
}
自定义插槽类型:
LIST_OF_POSTCODES S L six six D Y | C B one one P T | R G five four W L | G U one five one P B
一些示例话语:
GetOutages outage info for {postcode}
GetOutages fault info for {postcode}
GetOutages information for {postcode}
GetOutages outage information for {postcode}
GetOutages fault information for {postcode}
问题是,当我尝试从插槽中检索值时,它似乎正在拾取完整的句子:
{
name:'GetOutages',
slots:{
postcode:{
name:'postcode',
value:'information for r g 54 w l'
}
}
}
有人有什么建议吗?
【问题讨论】:
标签: node.js alexa alexa-skills-kit