alexa-app
alexa-app copied to clipboard
Example of waterfall or slot filling
Hi,
Sorry if this has already been covered, but I didn't find it. Is there an example of using alexa-app for multi step dialogs or filling missing slots?
Thanks, Jarrod
Unfortunately, I can't share the code that I've got considering that it's for my company, but I can probably offer some advice:
Use session.set() to store the user's responses via intents or slots into the user's session data. Keep asking questions until you have all the data you need. Then handle it. :-) Does that make sense?
Alternatively, there is beta version of handling that kinda stuff in the (amazon side) API now, but I'm not real familiar with how it works.
Thanks @ericblade for your reply but my current issue is how to reply on the same Intent with an answer that doesn't match it. Example:
findHolidayIntent {to}, {from} & {when} are required
find me holidays to {to} from {from} around the {when} find me holidays to {to} from {from} find me holidays to {to}
User: find me holidays to {to} => findHolidaysIntent => response.say("from which city?") + session.set("to",{to}) Alexa: From which city? User: {from} => No intent match because it can be any slots and the conversation stop...
Amazon created functions to handle that on the Alexa side with
- Dialog.Delegate
- Dialog.ElicitSlot
- Dialog.ConfirmSlot
- Dialog.ConfirmIntent
https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/ask-define-the-vui-with-gui#define-dialog
My model use required slots with the right utterances but it doesn't work if you don't use the Dialog directives from the Alexa SDK.
Any plan to integrate it instead of DIY on the app side?
@timoa No such plans, pull requests welcome!
I am currently using a workaround which adds the necessary directive with the updatedIntent object to the response.
However I'm not sure how to integrate that into alexa-app, I have no idea how to test it and I'm also unfamiliar with TS. Any suggestions on how to integrate that functionality?
Is delegate
the only supported type?
"dialog": {
type: "delegate"
},
@Dens49 I realise it was a year ago, but are you able to share how you did this? Or can this now be done in the latest version of the package?