Download the PHP package eristemena/botman-driver-dialogflow without Composer
On this page you can find all versions of the php package eristemena/botman-driver-dialogflow. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download eristemena/botman-driver-dialogflow
More information about eristemena/botman-driver-dialogflow
Files in eristemena/botman-driver-dialogflow
Package botman-driver-dialogflow
Short Description Dialogflow fulfillment driver for BotMan
License MIT
Homepage http://github.com/eristemena/botman-driver-dialogflow
Informations about the package botman-driver-dialogflow
BotMan Dialogflow Driver
BotMan driver to handle Dialogflow fulfillment with BotMan.
It uses eristemena/dialog-fulfillment-webhook-php
library, so it supports v1 and v2 of Dialogflow request.
Installation & Setup
First you need to pull in the Driver.
If you're using BotMan Studio, that's pretty much it.
But if you don't, then load the driver before creating the BotMan instance:
Usage
Hearing Messages
You can start receiving message using hears()
based on the Intent of the message,
Single Message Reply
The simplest way to reply to an incoming message is using BotMan's own reply()
method:
Multiple Message Replies
Normally when you want to send multiple replies, you use reply()
multiple times. Unfortunately this doesn't work for Dialogflow driver, cause the messages should be in a single response payload.
For that, you have to use specific methods for this driver addMessage()
and sendMessage()
as follow,
Rich Messages
Text
Use Dialogflow\RichMessage\Text
Image
Use Dialogflow\RichMessage\Image
Card
Use Dialogflow\RichMessage\Card
Quick Replies
Use Dialogflow\RichMessage\Suggestion
Custom Payload
All versions of botman-driver-dialogflow with dependencies
botman/botman Version ~2.1
eristemena/dialogflow-fulfillment-webhook-php Version dev-master