1.0.4-stable • Published 2 years ago

dialogflow-express v1.0.4-stable

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

dialogflow-express

Installation

This is a Node.js module available through the npm registry.

Before installing, download and install Node.js. Node.js 0.10 or higher is required.

If this is a brand new project, make sure to create a package.json first with the npm init command.

Installation is done using the npm install command:

npm i dialogflow-express

Usage

const {WebhookServer} = require('dialogflow-express')
const server = new WebhookServer()

const welcome= (agent) => {
      agent.add(`Congratulations`);
    }
const fallback = (agent) => {
      agent.add(`I didn't understand`);
      agent.add(`I'm sorry, can you try again?`);
    },

server.setIntent("Default Welcome Intent",welcome)
server.setIntent("Default Fallback Intent",fallback)

server.startServer()

Post Request

Post request will be \webhook

License

MIT