Apprentice is a library for deploying and developing actions via Dialogflow and Google Cloud Functions.
Project description
Apprentice
Apprentice is a framework built for developing Google Actions via Dialogflow and Google Cloud (serverless) Functions.
Includes:
- plug-and-play feel to get going quickly
- basic Dialogflow API 2.0 response handling
- local setup for quick iteration
Installation
pip install apprentice
Quickstart
We recommend you read the full tutorial here.
A Google Action project will consist of two things:
- Dialogflow Intent
- A webhook to satisfy your users intent
To generate a "Hello World" webhook, run:
$ apprentice init
This will create a file structure:
src/
main.py
requirements.txt
Run a local server with
$ apprentice run
and expose to localhost port via an https tunnel. Then add the url to the fulfillment webhook in Dialogflow.
For a more indepth example please see the tutorial I wrote here.
Deployment
Note
gcloud
cli must be installed and authorized for the following command
to work. If you wish to not have gcloud
cli installed, you can copy the file contents via the gcloud
function dashboard.
$ apprentice -f hello_world -s hello_world_agent -e hello_world
This will generate the command to execute a gcloud function deploy
via the cli.
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
License
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 Distribution
File details
Details for the file apprentice-0.4.0.tar.gz
.
File metadata
- Download URL: apprentice-0.4.0.tar.gz
- Upload date:
- Size: 18.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.20.1 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.29.0 CPython/3.6.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 97c13b4ac44e0bf23ab9681d115d56bdef3ebb2330a201fc739b2938a2a08d9a |
|
MD5 | 112bbe51bec4321183de0b4e4a7cc8fa |
|
BLAKE2b-256 | 5d872dc41b5ab142ee4b729d6d18eebb23fb2f6169577489bb0023c29f7906d2 |