问题
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:
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.
来源:https://stackoverflow.com/questions/55022398/how-to-extend-built-in-slot-type-with-additional-values-in-alexa