Framework for Building Virtual Assistants with API.AI
Project description
A flask extension serving as an API.AI SDK to provide an easy way to create virtual assistants 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 API.AI’s Natural Language Processing to interact with users.
- Recent Updates:
Now providing Rich Messages for the Google Assistant!
Support for Flask Blueprints
Convenient Home Assistant Integration
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
Internal API.AI schema generation and registration
Hello World
from flask import Flask
from flask_assistant import Assistant, ask
app = Flask(__name__)
assist = Assistant(app)
@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 and the route to your webhook URL.
Use action decorators to map the 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 Distributions
Built Distribution
Hashes for Flask_Assistant-0.3.2-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 45a18e8c08b476e545ba497073d48d04e7431be3d9dae470db0d227fc1239648 |
|
MD5 | 0bc30803a2705e9c768204c4745617b3 |
|
BLAKE2b-256 | fe07b5ea61beab25503f764d47197846504eeb90d9b57fe72e94e687d79da2f4 |