Implement Dialogflow ES Intent fulfillment interface
dariowho opened this issue · 1 comments
dariowho commented
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:
- Add an optional
fulfill()
method (interface tbd) to theIntent
class. This will be called by Intents when the Intent is detected.fulfill()
may returnlanguage.IntentResponse
objects, or otherIntent
classes
- 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 itsfulfill()
method.- Fulfillment is enabled per-intent in Dialogflow: Intents that do not define a custom
fulfill()
method (including those in the superclasses) should setwebhookUsed=False
at export time.
- Fulfillment is enabled per-intent in Dialogflow: Intents that do not define a custom
Test Cases
tbd