Framework for Building Virtual Assistants with Dialogflow
Project description
Create Virtual Assistants with Python
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
- Create an Assistant object with a Flask app.
- Use action decorators to map intents to the proper action function.
- Use action view functions to return ask or tell responses.
Documentation
- Check out the Quick Start to jump right in
- View the full documentation
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file Flask-Assistant-0.5.4.tar.gz
.
File metadata
- Download URL: Flask-Assistant-0.5.4.tar.gz
- Upload date:
- Size: 24.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.7.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9b342237f1cd47fb76f74c3f6e3493f4219c246feb9543c27dd2c923afa71ab4 |
|
MD5 | 4526634fb9cb42a26909df6cfedcd8c4 |
|
BLAKE2b-256 | 32f265893fd5844b42978b908855dc24adf4354e1d36e456810394e81c63ebc4 |
File details
Details for the file Flask_Assistant-0.5.4-py2.py3-none-any.whl
.
File metadata
- Download URL: Flask_Assistant-0.5.4-py2.py3-none-any.whl
- Upload date:
- Size: 33.8 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.7.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 142c9b4232c39b09c656bdba463965d98c69d556c9301509810c01a545f846d9 |
|
MD5 | 8d6fb27142f8ae87f7d3825e7c33b909 |
|
BLAKE2b-256 | fa5f710e79a6b3cd6bf72367173645b2bf28adf7f266139fe74e05ed924a14fc |