Jovo Model: Dialogflow
Learn how to turn the Jovo Model into a Dialogflow agent.
- Dialogflow-specific Elements in the Jovo Model
- Using the Dialogflow Jovo Model with the Jovo CLI
- Using the Dialogflow Jovo Model npm Package
Language models for Dialogflow are called Dialogflow agents. You can either manage them via API (what the Jovo CLI is doing during deployment) or in the Dialogflow console, which offers a graphical user interface.
Dialogflow agents include:
- Intents with training phrases (phrases in the Jovo Model) and entities (inputs)
- Entity types (input types)
- And more, like events, actions, fulfillment
Learn more about the structure in the official Dialogflow documentation. The Jovo Model can be translated into this structure by using the
jovo build command (see below) or the npm package (see below).
This section provides an overview how the Jovo Model (see general structure in the main Jovo Model docs) can be extended with platform-specific content for Dialogflow.
You can add options to Jovo intents like this:
In the above example, you can see that you can add specific elements like a
priority to an intent.
priority can have the following value :
You also can manage your
input as a list by specifying the parameter
You can add a specific parameter
automatedExpansion to allow automated expansion like this:
Find all types in the official Dialogflow system entities documentation.
If your intent uses an input (see how they are added to the Jovo Model) that requires a Dialogflow system entity type, you can add it like this:
Some elements (intents, entities) might be required only by the Dialogflow portion of your Jovo project. For this you can add a
dialogflow object to your Jovo Model.
dialogflow object contains the agent data in its original syntax. For example, you export your Dialoglow Agent, look at the files, and copy-paste the stuff that you need into this part of the Jovo Language Model file.
By using the
jovo build command, you can turn your Jovo Model files in the
models folder in your Jovo project into Dialogflow specific files.
Make sure that you have
dialogflow selected as
nlu in your
In the current version of the Jovo CLI, you can find the files inside the
jovo deploy command will create a
zip which you can then import into Dialogflow.
It will be stored inside the
dialogflow folder contains the following folders:
intents are saved in separate files and look like this:
It is important that
"webhookUsed" is set to
true for your Jovo code to be triggered when this intent is called.
The user phrases are added to a different file for each language, e.g.
MyNameIsIntent_usersays_en-us.json, and look like this:
If you have defined input types, you will find the
entities in separate folders as well.
This includes some agent specific information. We recommend to not change this file unless you know what you're doing.
- Dialogflow: System Entities
Install the package like this:
You can learn more about all the Jovo Model features here: Using the Jovo Model npm Packages.