alexa-js / alexa-app

A framework for Alexa (Amazon Echo) apps using Node.js
https://www.youtube.com/watch?v=pzM4jv7k7Rg
MIT License
1.03k stars 213 forks source link

Can we have a wildcard intent handler? #260

Open OpenDog opened 7 years ago

OpenDog commented 7 years ago

Can we have a single intent handler as an alternative to the the individual intent handler registrations?

Is this planed or worked on? I can do it if you are interested..

dblock commented 7 years ago

Not planned or worked on. Please do. It's not really possible with Alexa AFAIK.

cesarvarela commented 7 years ago

I'm interested on this too.

lazerwalker commented 7 years ago

I'm afraid this isn't really possible right now — it's a hard limitation of the Alexa Skills Kit API.

If there's a clever workaround as a client, I haven't figured it out (e.g. you can't just generate an inordinately large number of intents/utterances, as you'll pretty quickly hit a complexity inflection point where Amazon can't build your interaction model)

The best way I've found to mitigate not being able to have a wildcard intent is very robust state management, so if you receive an intent you're not expecting you can fallback as gracefully as possible.

Perhaps the most useful and pragmatic contribution here would be adding in support for state management and being able to model your intents in context of a state machine, much like the official Alexa node SDK lets you.