如果我们的后端收到请求说 AMAZON.YesIntent
或任何其他自定义 intent 。我们能否引出与触发 intent 不同的 intent 插槽作为响应。
例如:
...
user: Yes
(Amazon.YesIntent is mapped)
Alexa: Which city do you want to stay in?
(elicit slot of another intent)
...
最佳答案
是的,现在可以了,阅读更新部分
不幸的是你不能。只能使用 Dialog.ElicitSlot
指令发送相同类型的更新 intent 。
Note that you cannot change intents when returning a Dialog directive, so the intent name and set of slots must match the intent sent to your skill.
您将收到一张“无效指令”卡片和“请求的技能响应存在一些问题”作为错误消息。
更新(2019 年 4 月 8 日)
使用 updateIntent
对象指定必须触发其插槽的新 intent 。当您使用新的 updateIntent
更新最初发送给您的技能的 Intent 对象时,包括所有插槽,包括您没有更改的任何空插槽。
{
"type": "Dialog.ElicitSlot",
"slotToElicit": "slotOfSomeOtherIntent",
"updatedIntent": {
"name": "SomeOtherIntent",
"confirmationStatus": "NONE",
"slots": {
"slotOfSomeOtherIntent": {
"name": "slotOfSomeOtherIntent",
"value": "string",
"resolutions": {},
"confirmationStatus": "NONE"
}
}
}
}
阅读更多关于 Change the intent or update slot values during the dialog 的信息
阅读更多关于 ElicitSlot Directive 的信息
关于alexa - 我们可以在 Alexa 中引出不同 intent 的插槽吗,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51513917/