如果我们的后端收到说AMAZON.YesIntent
或任何其他自定义意图的请求。我们能否引发与触发意图不同的意图作为响应的插槽。
例如:
...
user: Yes
(Amazon.YesIntent is mapped)
Alexa: Which city do you want to stay in?
(elicit slot of another intent)
...
不幸的是你不能。只能使用Dialog.ElicitSlot
指令发送相同类型的更新意图。
请注意,在返回Dialog指令时无法更改意图,因此意图名称和插槽集必须与发送到您的技能的意图相匹配。
您将收到“无效指令”卡和“请求的技能响应存在一些问题”作为错误消息。
使用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的信息