Comments (6)
I like the idea of the onRequest
method, like:
voxaApp.onRequest('PlaybackController.NextCommandIssued', (voxaEvent) => {
// CODE
});
Though we should think more about the way to return the object, as most of them are not part of the state machine cycle
from voxa.
I don't like it, that would include state machine concepts (States) in request types that in reality are not part of the state machine execution, we never transition between states in AudioPlayer events or similar, in fact we couldn't even if we wanted cause those request types are out of session. If CanFulFillIntentRequest
can be executed with onState
then that seems like an error to me
from voxa.
But i do like the idea of having something like "onRequest" which just handles whatever request type we throw at it
from voxa.
Is the state machine concept strictly bound to being in a session?
I recently worked on a skill using the audio player, and I wanted to handle the PlaybackController request when a user resume the audio using the touch screen controls on a echo show/spot. I couldn't reuse the code I user for the ResumeIntent
and had to duplicate code and I needed the build the AudioPlayer directive manually because the AudioPlayer
class attach the directive to the reply when we return it in a state. I would be great to be able to reuse code in other states when having a request type, handling the request either with onState
or onRequest
, whichever we decide.
from voxa.
I think is more related to the way voxa handles a state machine intent request. it could be troublesome to manage those intents that don't return a speech or session attributes. At least we agreed on something we should have a handler perhaps named onRequest
. Could we come up with another way to reuse code out of another state?.
from voxa.
you could do something like
function genericHandler(event, reply) {
// do something
}
app.onAudioPlayerSomething(genericHandler)
app.onAudioPlayerSomethingElse(genericHandler)
I do think it's a great point that the directives should work on this handlers, at least the ones that make sense
from voxa.
Related Issues (20)
- Access user's location (Google Action) HOT 2
- Reply attribute should support an Array
- Change all instances of dialogFlow, dialog-flow and DialogFlow to the proper casing
- VOXA as a library is too big HOT 3
- Create Changelog.md
- Outdated sample code in the README.md
- States with an intents array filter should have priority over the ones that don't
- How to handle new RequestTypes? HOT 1
- Directive method requires three parameters when only needs one HOT 1
- Error creating new project with an existing directory
- Support for Dynamic Entities? HOT 6
- 100 MB in dependencies is way too much! HOT 5
- Clean Voxa installation with typescript is broken
- Dialogflow editor response has no filfillmentText when using v.3.3.0
- the State Flow plugin example in the docs is from v1
- Add directive for dynamic entities HOT 2
- Type 'Lambda Log | Lambda Log' is not assignable to type 'Lambda Log'. HOT 1
- CanFullfillIntent Requests must respond to all intents
- Not able to Create Remider in Alexa
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from voxa.