npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@jovotech/model-dialogflow

v4.0.3

Published

Jovo Model for Dialogflow

Downloads

3

Readme

Jovo Model: Dialogflow

Learn how to turn the Jovo Model into a Dialogflow agent.

Introduction

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).

Dialogflow-specific Elements in the Jovo Model

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.

Intents

You can add options to Jovo intents like this:

"HelloWorldIntent": {  
	"phrases":[  
		"hello",
		"say hello",
		"say hello world"
	],
	"dialogflow": {
		"priority": 500000,
		"webhookForSlotFilling": true
	}
},

In the above example, you can see that you can add specific elements like a priority to an intent.

The priority can have the following value :

| Definition | Value | Color | | ---------- |:-------:|:------:| | Highest | 1000000 | Red | | High | 750000 | Orange | | Normal | 500000 | Blue | | Low | 250000 | Green | | Ignore | 0 | Grey |

Inputs and Input Types

You also can manage your entity as a list by specifying the parameter isList:

"entities": [
	"any": {
		"type": {
			"dialogflow": "@sys.any"
		},
		"dialogflow": {
			"isList": true
		}
	}
]

You can add a specific parameter automatedExpansion to allow automated expansion like this:

"inputTypes": [
    {
        "name": "myCityInputType",
	    "dialogflow": {
        	"automatedExpansion": true
      	},
        "values": [
            {
                "value": "Berlin"
            },
            {
                "value": "New York",
                "synonyms": [
                    "New York City"
                ]
            }
        ]
    }
],

System Entities

Find all types in the official Dialogflow system entities documentation.

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

"entities": [
	"name": {
		"type": {
			"dialogflow": "@sys.given-name"
			// ...
		}
	}
]

Dialogflow-only Elements

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": {
    "intents": [
        {
            "name": "Default Fallback Intent",
            "auto": true,
            "webhookUsed": true,
            "fallbackIntent": true
        },
        {
            "name": "Default Welcome Intent",
            "auto": true,
            "webhookUsed": true,
            "events": [
                {
                    "name": "WELCOME"
                }
            ]
        }
    ],
    "entities": [
        {
            "name": "hobby",
            "isOverridable": true,
            "isEnum": false,
            "automatedExpansion": false
        }
    ]
}

The dialogflow object contains the agent data in its original syntax. For example, you export your Dialogflow Agent, look at the files, and copy-paste the stuff that you need into this part of the Jovo Language Model file.

Using the Dialogflow Jovo Model npm Package

Install the package like this:

$ npm install @jovotech/model-dialogflow

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