An example of using flask, flask-ask, and transitions to handle conversations with Alexa.
After using dgtony‘s AFG for scenario-based
dialogues I became more interested in using a state machine for managing
conversation state. In this example I use the python library transitions
to handle all the heavy lifting.
This is the model used in the example. Such diagrams can be made by the machine itself:
It is much simpler to reason about the conversational flow when using
a state machine.
Most state machine libraries have a logging ability. This will be
incredibly useful for keeping track of how users interact with
your skill.
Feel free to create issues if you have questions or comments!