Implement Webhook interface
dariowho opened this issue · 0 comments
dariowho commented
AS A Chatbot user
I WANT Agents to run Intent fulfillment procedures
SO THAT I can use Agents that actually do something (e.g. book a hotel room), and support more sophisticated conversation flows
Details
Webhook fulfillment calls are at the core of many prediction services. The proposal is to equip Intent
subclasses with an optional fulfill()
method (signature to be defined).
- When
fulfill(...)
is defined on anIntent
class,DialogflowEsConnector
will enable fulfillment on that intent in the exported Agent. - If there is at least one Intent with fulfillment enabled, and
DialogflowEsConnector
is instantiated without webhook information, a warning should be issued - The
Connector
interface should include abstract methods to parse fulfillment requests and provide responses accordingly DialogflowEsConnector
should implement fulfillment-related methods- A new Webhook interface should specify how webhooks are called and used
FlaskWebhook
should provide a baseline implementation of the Webhook interface. It shoud take aConnector
instance as a parameter, and wrap fulfillment-related methods around a simple Flask service