我们能否在Alexa中引出不同意图的插槽

问题描述 投票:3回答:1

如果我们的后端收到说AMAZON.YesIntent或任何其他自定义意图的请求。我们能否引发与触发意图不同的意图作为响应的插槽。

例如:

...
user: Yes
     (Amazon.YesIntent is mapped)
Alexa: Which city do you want to stay in?
     (elicit slot of another intent)
...
alexa alexa-skills-kit alexa-skill
1个回答
3
投票

是的,现在可以,请阅读更新部分

不幸的是你不能。只能使用Dialog.ElicitSlot指令发送相同类型的更新意图。

请注意,在返回Dialog指令时无法更改意图,因此意图名称和插槽集必须与发送到您的技能的意图相匹配。

您将收到“无效指令”卡和“请求的技能响应存在一些问题”作为错误消息。

更新(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的信息

© www.soinside.com 2019 - 2024. All rights reserved.