dialogflow-fulfillment
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
Installation
The preferred way to install dialogflow-fulfillment is from PyPI with pip:
pip install dialogflow-fulfillment
Features
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
messages:
- Text
- Image
- Card
- Quick Replies
- Payload
More examples
Documentation
For more information about the package, guides and examples of usage, see the documentation.
Contribute
All kinds of contributions are welcome!
For an overview about how to contribute to dialogflow-fulfillment, see the contributing guide.
License
This project is licensed under the Apache 2.0 license.
For more details about the license, see the LICENSE file.
Acknowledgments
Thanks to the Dialogflow development team!
Metadata
Release files for dialogflow-fulfillment 0.4.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| dialogflow-fulfillment-0.4.5.tar.gz | 17.6 kB | Without provenance | Details for dialogflow-fulfillment-0.4.5.tar.gz |
Release files / dialogflow-fulfillment-0.4.5.tar.gz
| Download URL | dialogflow-fulfillment-0.4.5.tar.gz |
|---|---|
| Size | 17.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a9a74f8516548ccc4c8c5db27f94918e1de24a34a140f5ef2fa02bb548d5219c
|
|
BLAKE2b-256 checksum How to use checksums |
968ad5223c9d9703b6a69f7c56b9bb65b0f617bda4f99e92c53c948896eff2d2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/6.0.0 pkginfo/1.9.6 requests/2.28.2 requests-toolbelt/0.10.1 tqdm/4.64.1 CPython/3.8.16
|
Security for dialogflow-fulfillment 0.4.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.