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

送分小仙女□ 提交于 2020-01-25 02:19:07

问题


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.


回答1:


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:

  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

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.



来源:https://stackoverflow.com/questions/55022398/how-to-extend-built-in-slot-type-with-additional-values-in-alexa

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!