Skip to content
This repository was archived by the owner on Jun 26, 2025. It is now read-only.

Commit 201425a

Browse files
committed
update readme
1 parent 5fd93ce commit 201425a

File tree

3 files changed

+70
-98
lines changed

3 files changed

+70
-98
lines changed

README.md

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
Create Virtual Assistants with Python
2+
=====================================
3+
4+
[![image](https://img.shields.io/pypi/v/flask-assistant.svg)](https://pypi.python.org/pypi/flask-assistant)
5+
[![image](https://travis-ci.org/treethought/flask-assistant.svg?branch=master)](https://travis-ci.org/treethought/flask-assistant) ![image](https://img.shields.io/badge/python-2.7,%203.5,%203.6,%203.7-blue.svg) [![image](https://img.shields.io/badge/discord-join%20chat-green.svg)](https://discord.gg/m6YHGyJ)
6+
7+
A flask extension serving as a framework to easily create virtual assistants using [Dialogflow](https://dialogflow.com/docs) which may be integrated
8+
with platforms such as [Actions on
9+
Google](https://developers.google.com/actions/develop/apiai/) (Google
10+
Assistant).
11+
12+
Flask-Assistant allows you to focus on building the core business logic
13+
of conversational user interfaces while utilizing Dialogflow's Natural
14+
Language Processing to interact with users.
15+
16+
**Now supports Dialogflow V2!**
17+
18+
This project is heavily inspired and based on John Wheeler's
19+
[Flask-ask](https://github.com/johnwheeler/flask-ask) for the Alexa
20+
Skills Kit.
21+
22+
Features
23+
--------
24+
25+
> - Mapping of user-triggered Intents to action functions
26+
> - Context support for crafting dialogue dependent on the user's requests
27+
> - Define prompts for missing parameters when they are not present in the users request or past active contexts
28+
> - A convenient syntax resembling Flask's decoratored routing
29+
> - Rich Responses for Google Assistant
30+
31+
Hello World
32+
-----------
33+
34+
```python
35+
from flask import Flask
36+
from flask_assistant import Assistant, ask
37+
38+
app = Flask(__name__)
39+
assist = Assistant(app, project_id='GOOGLE_CLOUD_PROJECT_ID')
40+
41+
@assist.action('Demo')
42+
def hello_world():
43+
speech = 'Microphone check 1, 2 what is this?'
44+
return ask(speech)
45+
46+
if __name__ == '__main__':
47+
app.run(debug=True)
48+
```
49+
50+
How-To
51+
------
52+
53+
> 1. Create an Assistant object with a Flask app.
54+
> 2. Use action decorators to map intents to the
55+
> proper action function.
56+
> 3. Use action view functions to return ask or tell responses.
57+
58+
Documentation
59+
-------------
60+
61+
- Check out the [Quick
62+
Start](http://flask-assistant.readthedocs.io/en/latest/quick_start.html)
63+
to jump right in
64+
- View the full
65+
[documentation](http://flask-assistant.readthedocs.io/en/latest/)

README.rst

Lines changed: 0 additions & 98 deletions
This file was deleted.

docs/source/index.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,11 @@ A Minimal Assistant
4545
from flask import Flask
4646
from flask_assistant import Assistant, tell
4747
48+
# to see the full request and response objects
49+
# set logging level to DEBUG
50+
import logging
51+
logging.getLogger('flask_assistant').setLevel(logging.DEBUG)
52+
4853
app = Flask(__name__)
4954
assist = Assistant(app, project_id='GOOGLE_CLOUD_PROJECT_ID')
5055

0 commit comments

Comments
 (0)