【问题标题】:Can we elicit slot of a different intent in Alexa我们可以在 Alexa 中引出不同意图的插槽吗
【发布时间】:2018-07-25 08:09:37
【问题描述】:

如果我们的后端收到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】:

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

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

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

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

    更新(2019 年 4 月 8 日)

    使用updateIntent 对象指定必须触发其槽的新意图。当您使用新的 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

    【讨论】:

    • 这仍然是真的吗?您链接的文档使即使在 ElicitSlot 指令下也可以在 updatedIntent 中传递其他意图:“使用它在对话期间更改意图或设置槽值和确认状态。”
    • 在撰写本文时这是不可能的。现在可以使用 updatedIntent。我会尽快更新我的答案。感谢您指出这一点。
    猜你喜欢
    • 2021-01-05
    • 2019-10-23
    • 2018-02-12
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-09-23
    • 1970-01-01
    相关资源
    最近更新 更多