Giter VIP home page Giter VIP logo

dialogflow-fulfillment's Introduction

dialogflow-fulfillment

PyPI version Downloads Tests status Documentation status Maintainability GitHub license

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!

dialogflow-fulfillment's People

Contributors

dependabot[bot] avatar gcaccaos avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.