如何在 Alexa 中使用附加值扩展内置插槽类型?

How to extend built-in slot type with additional values in Alexa?

其实,我用过AMAZON.DATE,这是Alexa内置的slot。现在我想在那个插槽中添加 'daily' 值。那么谁能告诉我如何扩展 Alexa 内置插槽,比如如何在内置插槽中添加额外的值?请举个例子。

你可以看到我在图 1 中设置的提醒意图中有用户 AMAZON.DATE

在图 2 中,您可以看到内置插槽类型,但我看不到添加任何附加值的任何选项。所以请帮助我实现这个目标。

根据documentation你可以扩展一个内置插槽类型:

Before you can extend a built-in type, you need to add it to your skill. In the left-hand navigation, note the types under Slot Types. If the slot type to extend is not included, add it to your skill:

  1. From the left-hand navigation, click Add next to Slot Types.

  2. Select the Use an existing slot type from Alexa's built-in library option.

  3. Find the built-in slot type you want to add. You can filter the slot types by name.

  4. Click Add Slot Type for each built-in type to add.

  5. Be sure to save your work as you make changes.

To extend a built-in slot type, add values to it just as you would a custom type. In the left-hand navigation, under Slot Types, select the slot type to edit. Enter each value and click the plus or press Enter.

For more about creating and editing slot types in the developer console, see Create and Edit Custom Slot Types

但看起来您无法扩展 AMAZON.DATE 插槽(因为它不是列表插槽类型 - 更多详细信息 here

所以为了处理 daily 这个词,你应该创建一个单独的自定义槽,例如 FrequencySlot,并在那里定义一些值(见附件),然后 - 添加新的话语到你的意图并处理代码中的新插槽类型。