In this step, we will turn an Alexa Skill Interaction Model into a Jovo Language Model. This step isn't necessary to get your app running at this step of the course, but it is especially helpful for fast testing in the Jovo Debugger (the buttons there access the Jovo Language Model, in the previous step it was LAUNCH
and MyNameIsIntent
, for example).
- Introduction to the Jovo Language Model
- Accessing the Interaction Model
- jovo build reverse
- Next Step
Introduction to the Jovo Language Model
The Jovo Language Model offers an abstracted way to define language models for multiple platforms. For example, you can create the model files once and translate them into an Alexa Interaction Model and a Dialogflow Agent for Google Actions.
The Jovo Language Model also works well with other tools in the Jovo ecosystem. For example, you can directly access the intents from the Jovo Debugger for fast testing:
In this course step, we will import the existing Interaction Model of the Quiz Game Alexa Skill template and turn it into a Jovo Language Model, in two sections:
Accessing the Interaction Model
The Alexa Skill Interaction Model of quiz game template comes with some custom intents and a custom slot type:
It would be a lot of manual work to copy all the intents and values into the Jovo Language Model by hand. This is why we offer two ways to import the Interaction Model files into your Jovo project:
Alternative 1: jovo get
You can import an existing Alexa Skill project from the Amazon Developer Console (including the Interaction Model files) into your Jovo project by using the jovo get
command:
If you're doing this for the first time, this will prompt you to choose from all Alexa Skills in the current developer account connected to your ASK profile:
After you select your Skill project, it will import the files into the platforms/alexaSkill
folder of your Jovo project.
In the platforms/alexaSkill/models
folder you can now find a file called en-US.json
which contains your interaction model. It starts like this:
Alternative 2: Copy paste
You can also access the Alexa Interaction Model on GitHub: skill-sample-nodejs-quiz-game/models/en-US.json.
You can use this file and copy it into your platforms/alexaSkill/models
folder.
Don't see that folder? Run the following command first:
This will create the platforms/alexaSkill
folder in your Jovo project.
jovo build reverse
Bringing the Interaction Model from above into the right format for the Jovo Language Model by hand can be quite time consuming.
This is why we created a "reverse build" CLI command that saves you some time:
This will use the en-US.json
file in the platforms/alexaSkill/models
folder and translate it into a Jovo Language Model file in the models
folder of your Jovo project directory.
This file looks like this:
After this step, we can access the intents of the model in the Jovo Debugger.
Next Step
We have everything prepared for fast testing now. Let's dive deeper into the Skill's structure by converting from ASK SDK canHandle
and handle
to the Jovo routing.