You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 26, 2025. It is now read-only.
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
fromflaskimportFlaskfromflask_assistantimportAssistant, askapp=Flask(__name__)
assist=Assistant(app, project_id="GOOGLE_CLOUD_PROJECT_ID")
@assist.action("Demo")defhello_world():
speech="Microphone check 1, 2 what is this?"returnask(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.