【问题标题】:Alexa custom skill: getting FallbackIntent instead of validation promptAlexa 自定义技能:获取 FallbackIntent 而不是验证提示
【发布时间】:2022-06-21 07:24:58
【问题描述】:

我有一个带有GetMenuIntent 的交互模型,我可以用“what's for {meal}”调用它。 meal 是一个 MealType 自定义槽,允许值为“breakfast”和“lunch”。我在GetMenuIntent 中的meal 插槽上添加了验证,以仅允许在插槽类型中定义的那些值,并且它适用于那些配置的值。

但是,在保存并构建模型后,当我将“晚餐吃什么”放入 Utterance Profiler 或交互式测试器中时,它最终调用了我的 FallbackIntent 而不是重新提示输入正确的值。

我觉得我正在尝试做的与亚马逊自己的示例 here 并没有太大不同。

这里的“午餐吃什么”正常工作:

这里的“晚餐吃什么”忽略了我的 GetMenuIntent 并改为调用 FallbackIntent:

这是我的交互模型:

{
  "interactionModel": {
    "languageModel": {
      "invocationName": "school menus",
      "intents": [
        {
          "name": "AMAZON.CancelIntent",
          "samples": []
        },
        {
          "name": "AMAZON.HelpIntent",
          "samples": []
        },
        {
          "name": "AMAZON.StopIntent",
          "samples": []
        },
        {
          "name": "AMAZON.NavigateHomeIntent",
          "samples": []
        },
        {
          "name": "GetMenuIntent",
          "slots": [
            {
              "name": "meal",
              "type": "Meal"
            },
            {
              "name": "date",
              "type": "AMAZON.DATE"
            }
          ],
          "samples": [
            "whats for {meal} {date}",
            "what will you have for {meal} {date}",
            "what is on the menu for {meal} {date}",
            "what are we having for {meal} {date}",
            "what we're having for {meal} {date}"
          ]
        },
        {
          "name": "AMAZON.FallbackIntent",
          "samples": []
        }
      ],
      "types": [
        {
          "values": [
            {
              "name": {
                "value": "lunch"
              }
            },
            {
              "name": {
                "value": "breakfast"
              }
            }
          ],
          "name": "Meal"
        }
      ]
    },
    "dialog": {
      "intents": [
        {
          "name": "GetMenuIntent",
          "confirmationRequired": false,
          "prompts": {},
          "slots": [
            {
              "name": "meal",
              "type": "Meal",
              "elicitationRequired": false,
              "confirmationRequired": false,
              "prompts": {},
              "validations": [
                {
                  "type": "hasEntityResolutionMatch",
                  "prompt": "Slot.Validation.806855880612.19281662909.602239253259"
                }
              ]
            },
            {
              "name": "date",
              "type": "AMAZON.DATE",
              "elicitationRequired": false,
              "confirmationRequired": false,
              "prompts": {}
            }
          ]
        }
      ],
      "delegationStrategy": "ALWAYS"
    },
    "prompts": [
      {
        "id": "Slot.Validation.806855880612.19281662909.602239253259",
        "variations": [
          {
            "type": "PlainText",
            "value": "Hmm, I don't know about that menu type. Please try again."
          }
        ]
      }
    ]
  },
  "version": "48"
}

【问题讨论】:

    标签: alexa alexa-skills-kit alexa-slot


    【解决方案1】:

    由于这是 6 个月大,我假设您现在已经知道您的交互模型只包括午餐和早餐。

    【讨论】:

      猜你喜欢
      • 2021-11-18
      • 2018-11-04
      • 2018-12-31
      • 1970-01-01
      • 1970-01-01
      • 2020-02-23
      • 1970-01-01
      • 2017-08-28
      • 1970-01-01
      相关资源
      最近更新 更多