不允许有该类型的槽AMAZON.SearchQuery
在相同的发声与另一个插槽,在你的情况下AMAZON.NUMBER
.
根据需要标记其中一个插槽并单独索取。
一个小例子:
创建放入话语和槽中的 Intent:
"intents": [
{
"name": "AddBookmarkIntent",
"samples": [
"I am at {pageno}"
],
"slots": [
{
"name": "mybook",
"type": "AMAZON.SearchQuery",
"samples": [
"For {mybook}"
]
},
{
"name": "pageno",
"type": "AMAZON.NUMBER"
}
]
}
根据需要标记特定插槽,以便 Alexa 会自动请求:
"dialog": {
"intents": [
{
"name": "AddBookmarkIntent",
"confirmationRequired": false,
"prompts": {},
"slots": [
{
"name": "mybook",
"type": "AMAZON.SearchQuery",
"elicitationRequired": true,
"confirmationRequired": false,
"prompts": {
"elicitation": "Elicit.Intent-AddBookmarkIntent.IntentSlot-mybook"
}
}
]
}
]
}
并创建询问插槽的提示:
"prompts": [
{
"id": "Elicit.Intent-AddBookmarkIntent.IntentSlot-mybook",
"variations": [
{
"type": "PlainText",
"value": "For which book you like to save the page?"
}
]
}
]
使用技能生成器 BETA(而不是其编辑器)可能会更容易,因为它会在后台自动创建 JSON。