-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for custom slot types #5
Conversation
…l using the syntax '{-|Name}' => '{Name}', where Name is the name of a slot using a custom datatype in its skill's interaction model.
This solution was proposed by @simplydallas in #2 to support @rickwargo's improvement on alexa-app, which without his PR only supports Amazon's LITERAL, NUMBER, DATE, TIME, and DURATION slot types. |
Looks good to me. Not exactly how I added it to my code but the exact same result with the minus designating that although it is a list, it is one that should be treated as empty since Amazon has the actual list stored and only needs the {keyword} syntax to work with it. |
+1 |
see #7 Amazon is deprecating |
But LITERAL seemingly will continue to be supported: "Backward Compatibility There are use cases where using AMAZON.LITERAL instead of custom slots might makes sense - for instance a Home Automation skill in which the user can customize the alexa-app's room names for their house. While specifying a custom slot doesn't limit the values that can be used, one may have better results when using LITERAL so the utterances can be created for their specific home (configured in the alexa-app itself)... Agreed that dictionary support is however no longer needed... |
@d0t101101 hmmm that's interesting. Can you send me the link with that text? I'd like to read it. |
perhaps you could explain a bit what you mean when you say: "While specifying a custom slot doesn't limit the values that can be used, one may have better results when using LITERAL so the utterances can be created for their specific home (configured in the alexa-app itself)" Can you explain what you mean about better results? Better how? I found that line in the document that you referenced above. But you left out the next line following it: "Migrating to a custom slot type is recommended, as it is easier to define the sample utterances and achieve better accuracy." The doc seems to indicate the opposite of what your comment suggests, but maybe I'm missing something or misunderstanding. |
Hi, After digging deeper I realized that it shouldn't really matter what the values in the skills ASK custom slots are, as validation (i.e. in my example above - which rooms may be controlled via HA) must still be done in the Alexa-App code anyway... Please disregard... |
User can create a slot name literal using the syntax
{-|Name}
, whereName
is the name of a slot using a custom datatype in its skill's interaction model. This will convert the expression to{Name}
and treat it as a string literal over which no combinatorics will be performed.