dariowho/intents

Implement Dialogflow ES Intent fulfillment interface

dariowho opened this issue · 1 comments

AS A chatbot user
I WANT Agent to handle Intents with custom business logic
SO THAT it can perform actions corresponding to my requests

Details

Fulfillment calls are used by Agents to implement more complex conversation flows, and to perform relevant actions for a given intent by calling an underlying API (add to cart, send payment request, retrieve requested information, ...). To add suppport for fulfillment calls, Intents must:

  1. Add an optional fulfill() method (interface tbd) to the Intent class. This will be called by Intents when the Intent is detected.
    • fulfill() may return language.IntentResponse objects, or other Intent classes
  2. Create a fulfillment framework (could be part of the connector, or a module on its own). This will receive Dialogflow fulfillment requests, build the corresponding Intent object, and run its fulfill() method.
    • Fulfillment is enabled per-intent in Dialogflow: Intents that do not define a custom fulfill() method (including those in the superclasses) should set webhookUsed=False at export time.

Test Cases

tbd

Superseded by #17