4.0.3 • Published 3 months ago

@jovotech/model-google v4.0.3

Weekly downloads
-
License
Apache-2.0
Repository
-
Last release
3 months ago

Jovo Model: Google Assistant

Learn how to turn the Jovo Model into a Conversational Actions model for Google Assistant.

Introduction

Google Assistant Conversational Actions are a new way to build Google Actions that don't require Dialogflow as NLU service. You can either manage the language models via API (what the Jovo CLI is doing during deployment) or in the Actions Builder console, which offers a graphical user interface.

Learn more about the structure in the official Conversational Actions documentation. The Jovo Model can be translated into this structure by using the jovo build command (see below) or the npm package (see below).

Google Assistant-specific Elements in the Jovo Model

This section provides an overview of how the Jovo Model see general structure in the main Jovo Model docs can be extended with platform-specific content for Google Assistant.

Invocation

You can define a Google Assistant-specific invocation name like this:

"invocation": {
  "googleAssistant": "my test action"
  // Other platforms
},

Built-in Types

Find all built-in types in the official Conversational Action System Types Reference.

If your intent uses an entity (see how they are added to the Jovo Model) that requires a Google Assistant system type, you can add it like this:

"entities": [
  {
    "name": "number",
    "type": {
      "googleAssistant": "actions.type.Number"
    }
  }
]

Google Assistant-only Elements

Some elements (intents, types) might be required only by the Google Assistant portion of your Jovo project. For this you can add a googleAssistant object to your Jovo Model.

"googleAssistant": {
  "custom": {
    "global": {
      "actions.intent.MAIN": {
        "handler": {
          "webhookHandler": "Jovo"
        }
      }
    },
    "intents": {
      "TestIntent": {
        "trainingPhrases": [
          "Hello World"
        ]
      }
    }
  }
}

This object follows the structure of the Google Assistant Model .yaml files in JSON format.

Using the Google Assistant Jovo Model with the Jovo CLI

By using the jovo build command, you can turn your Jovo Model files in the models folder in your Jovo project into Conversational Action specific files.

Learn more in the Google Assistant platform documentation.

Using the Google Assistant Jovo Model npm Package

Install the package like this:

$ npm install @jovotech/model-googleassistant

You can learn more about all the Jovo Model features here: Using the Jovo Model npm Packages.