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
Release files for Flask-Assistant 0.5.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| Flask-Assistant-0.5.4.tar.gz | 24.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| Flask_Assistant-0.5.4-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details |
Total release size: 58.6 kB
Release files / Flask-Assistant-0.5.4.tar.gz
| Download URL | Flask-Assistant-0.5.4.tar.gz |
|---|---|
| Size | 24.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9b342237f1cd47fb76f74c3f6e3493f4219c246feb9543c27dd2c923afa71ab4
|
|
BLAKE2b-256 checksum How to use checksums |
32f265893fd5844b42978b908855dc24adf4354e1d36e456810394e81c63ebc4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|
Release files / Flask_Assistant-0.5.4-py2.py3-none-any.whl
| Download URL | Flask_Assistant-0.5.4-py2.py3-none-any.whl |
|---|---|
| Size | 33.8 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
142c9b4232c39b09c656bdba463965d98c69d556c9301509810c01a545f846d9
|
|
BLAKE2b-256 checksum How to use checksums |
fa5f710e79a6b3cd6bf72367173645b2bf28adf7f266139fe74e05ed924a14fc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|