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

编程入门 行业动态 更新时间:2024-10-06 04:04:01
本文介绍了如何在Alexa中使用其他值扩展内置插槽类型?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

实际上,我使用了Alexa内置插槽AMAZON.DATE。现在,我想在该广告位中添加每日价值。因此,谁能告诉我如何扩展Alexa内置插槽,例如如何在内置插槽中添加其他值?请举个例子。

您可以在图像1 中看到我的集合提醒意图中包含用户AMAZON.DATE。

在图2中,您可以看到内置的插槽类型,但是我没有选择添加任何附加值的选项。因此,请帮助我实现这一目标。

解决方案

根据

Actually, I have used AMAZON.DATE which is Alexa built-in slot. Now I want to add 'daily' value in that slot. So can anyone tell me how to extend Alexa built-in slots, like how to add additional values in the built-in slot? Please give an example.

You can see I have user AMAZON.DATE in my set reminder intent in image 1

In image 2 you can see built-in slot type but I do not get any option to add any additional values. So please help me to achieve this.

解决方案

According to documentation you can extend a built-in slot type:

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:

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

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

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

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

  • 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

    But it looks, that you cannot extend AMAZON.DATE slot (since it's not a list slot type - more details here)

    So in order to handle daily word, you should create a separate custom slot called for example FrequencySlot, and define there some values (see attachment) and then - add new utterances to your intent and handle new slot type in the code.

    更多推荐

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

    本文发布于:2023-11-28 03:30:23,感谢您对本站的认可!
    本文链接:https://www.elefans.com/category/jswz/34/1640786.html
    版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
    本文标签:插槽   类型   如何在   Alexa

    发布评论

    评论列表 (有 0 条评论)
    草根站长

    >www.elefans.com

    编程频道|电子爱好者 - 技术资讯及电子产品介绍!