Create webhook services for Dialogflow using Python
dialogflow-fulfillment is a package for Python that helps developers to create webhook services for Dialogflow.
The package provides an API for creating and manipulating response messages, output contexts and follow-up events in conversations.
A simple example
from dialogflow_fulfillment import QuickReplies, WebhookClient # Define a custom handler function def handler(agent: WebhookClient) -> None: """ This handler sends a text message along with a quick replies message back to Dialogflow, which uses the messages to build the final response to the user. """ agent.add('How are you feeling today?') agent.add(QuickReplies(quick_replies=['Happy :)', 'Sad :('])) # Create an instance of the WebhookClient agent = WebhookClient(request) # Handle the request using the handler function agent.handle_request(handler) # Get the response response = agent.response
pip install dialogflow-fulfillment
dialogflow-fulfillment's key features are:
- Webhook Client: handle webhook requests using a custom handler function or a map of handlers for each intent
- Contexts: process input contexts and add, set or delete output contexts
- Events: trigger follow-up events with optional parameters
- Rich Responses: create and send the following types of rich response
- Quick Replies
For more information about the package, guides and examples of usage, see the documentation.
All kinds of contributions are welcome!
For an overview about how to contribute to dialogflow-fulfillment, see the contributing guide.
This project is licensed under the Apache 2.0 license.
For more details about the license, see the LICENSE file.
Thanks to the Dialogflow development team!
Release history Release notifications | RSS feed
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size dialogflow-fulfillment-0.4.4.tar.gz (17.6 kB)||File type Source||Python version None||Upload date||Hashes View|
Hashes for dialogflow-fulfillment-0.4.4.tar.gz