How do I define a custom slot type that isn't a list?

后端 未结 5 1611
盖世英雄少女心
盖世英雄少女心 2020-12-24 02:09

I\'m playing around with the Alexa Skills Kit (for the Amazon Echo) and want to create a skill that would send the intent to an AWS Lambda function which would just email so

5条回答
  •  春和景丽
    2020-12-24 02:47

    Literals are different than other slot types in that you must provide training in the sample utterance, as mentioned in the official documentation: https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/alexa-skills-kit-interaction-model-reference

    Sample Utterances Syntax

    Sample utterances map the phrases the user can speak to the intents you have defined. They are written as lines in a plain text file, using the following format:

    IntentName  this is a sample utterance with no slots
    IntentName  this is a sample utterance containing a {SlotName}
    IntentName  this is a sample utterance containing a {SlotName} and {AnotherSlotName}
    

    Note that the above format applies to all slot types except AMAZON.LITERAL. For AMAZON.LITERAL, you also need to specify a sample slot value:

    IntentName  this is a sample utterance containing a {slot value|SlotName} using LITERAL
    

    Alternatively, using Custom Slots will allow you to provide the slot after defining numerous sample custom slot values. In this scenario, you would create a new custom slot called myMemo with a type of the custom slot name, such as MY_MEMO. Your custom slot value would be populated with potential values (these are not the only values it will receive), such as:

    walk the dog
    eat more bacon
    go to the store on the way home
    

提交回复
热议问题