Skip to content

Commit 374094b

Browse files
authored
Update readme for clarity (#33)
1 parent 4663d17 commit 374094b

File tree

1 file changed

+18
-25
lines changed

1 file changed

+18
-25
lines changed

README.md

Lines changed: 18 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,14 @@
22
[![Build Status](https://travis-ci.com/andrewgy8/apprentice.svg?branch=master)](https://travis-ci.com/andrewgy8/apprentice)
33
[![PyPI version](https://badge.fury.io/py/apprentice.svg)](https://badge.fury.io/py/apprentice)
44

5-
Apprentice is a framework for developing actions via Dialogflow and Google Cloud Functions.
5+
Apprentice is a framework built for developing Google Actions
6+
via [Dialogflow](https://dialogflow.com) and
7+
[Google Cloud (serverless) Functions](https://cloud.google.com/functions/).
8+
9+
Includes:
10+
- plug-and-play feel to get going quickly
11+
- basic Dialogflow API 2.0 response handling
12+
- local setup for quick iteration
613

714
## Installation
815

@@ -13,10 +20,10 @@ pip install apprentice
1320
## Quickstart
1421

1522
A Google Action project will consist of two things:
16-
1. A Dialogflow defined action
17-
1. An endpoint that your Dialogflow Action can talk to.
23+
1. [Dialogflow Intent](https://dialogflow.com/docs/intents)
24+
1. A webhook to satisfy your users intent
1825

19-
To generate a Hello World application, you can run:
26+
To generate a "Hello World" webhook, run:
2027

2128
```bash
2229
$ apprentice init
@@ -30,16 +37,17 @@ src/
3037
requirements.txt
3138
```
3239

33-
`main.py` is the file that `gcloud` looks for to upload the function.
34-
It is important that the name, `main.py`, remains in order to use `gcloud` cli.
35-
36-
## Testing
37-
38-
To make local development quicker, you can run a local server with
40+
Run a local server with
3941
```bash
4042
$ apprentice run
4143
```
4244

45+
and expose to localhost port via an https tunnel. Then add the url to the fulfillment
46+
webhook in Dialogflow.
47+
48+
For a more indepth example please see the tutorial I wrote
49+
[here](https://medium.com/@andrew_32881/hey-google-talk-to-24dfd336acd).
50+
4351
## Deployment
4452

4553
### Note
@@ -53,21 +61,6 @@ $ apprentice -f hello_world -s hello_world_agent -e hello_world
5361

5462
This will generate the command to execute a `gcloud function deploy` via the cli.
5563

56-
## Getting Started
57-
58-
```python
59-
from apprentice import Apprentice
60-
61-
apr = Apprentice(__name__)
62-
63-
64-
@apr.route('/', methods=['POST'])
65-
def webhook(*args, **kwargs):
66-
reply = 'Hello world!'
67-
return apr.generate_text_response(reply)
68-
69-
```
70-
7164
## Contributing
7265
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
7366

0 commit comments

Comments
 (0)