Defining the Conversation Model
The core component of all conversation models is the dialog. Dialogs capture one or more sample conversations that will take place between Alexa and a user.
In ACDL, dialogs are declared with the dialog keyword, followed by the dialog’s type and name. The beginnings of a dialog declaration will look like this:
| dialog Nothing ScheduleTripDialog { |
| // dialog body goes here |
| } |
As shown here, the name of the dialog is ScheduleTripDialog and the type is Nothing. At this time, Nothing is the only valid type for dialogs, although that could change in the future as Alexa Conversations and ACDL evolve.
Within the body of the dialog, you’ll define one or more sample conversations using the sample keyword:
| dialog Nothing ... |
Get Build Talking Apps for Alexa now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.