Code Monkey home page Code Monkey logo

flask-assistant's Introduction

Create Virtual Assistants with Python

image image image image

A flask extension serving as a framework to easily create virtual assistants using Dialogflow which may be integrated with platforms such as Actions on Google (Google Assistant).

Flask-Assistant allows you to focus on building the core business logic of conversational user interfaces while utilizing Dialogflow's Natural Language Processing to interact with users.

Now supports Dialogflow V2!

This project is heavily inspired and based on John Wheeler's Flask-ask for the Alexa Skills Kit.

Features

  • Mapping of user-triggered Intents to action functions
  • Context support for crafting dialogue dependent on the user's requests
  • Define prompts for missing parameters when they are not present in the users request or past active contexts
  • A convenient syntax resembling Flask's decoratored routing
  • Rich Responses for Google Assistant

Hello World

from flask import Flask
from flask_assistant import Assistant, ask

app = Flask(__name__)
assist = Assistant(app, project_id="GOOGLE_CLOUD_PROJECT_ID")

@assist.action("Demo")
def hello_world():
    speech = "Microphone check 1, 2 what is this?"
    return ask(speech)

if __name__ == "__main__":
    app.run(debug=True)

How-To

  1. Create an Assistant object with a Flask app.
  2. Use action decorators to map intents to the proper action function.
  3. Use action view functions to return ask or tell responses.

Documentation

flask-assistant's People

Contributors

1337phantom avatar adamwolf avatar busunkim96 avatar captain-sysadmin avatar chaoranxie avatar davidalbertonogueira avatar dependabot[bot] avatar fameoflight avatar gitter-badger avatar gmolau avatar graydyn avatar guilhem23 avatar jsemig avatar krish-ag avatar mutahirqureshi avatar r055mc avatar robwilkes avatar samimoftheworld avatar snyk-bot avatar sriramsv avatar treethought 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.