⭐ an actions on google application which can be used to easily generate teams by just using voice commands.
- Dialogflow: Easy and self-explanatory ML interface
- Firebase functions: Use Node.js code without worrying about servers / and additional costs
- Actions on Google: You can test and publish your Action easily
- TypeScript
TL;DR? Those instructions are specifically meant to be very detailed to give absolute newbies a place to start. If you happen to have some experience with the used technologies, you will be able to skim the instructions whilst understanding most of it.
- Visit the docs if you are not sure how.
- Visit the docs if you are not sure how (you only need to add a new agent. You do not have to create any intents).
- Visit the actions on google console
- Log in using your Google Account
- Click on the big ➕ (Add/import project)
- You should now be able to see the project which was created by Dialogflow, just select it and choose
create project
- Choose
Conversational
at the very bottom - Choose an invokation of your liking (i.e. mine is
generate teams
)
- Click the settings symbol in the top left corner
- Choose
Export and Import
- Choose
restore from zip
- Drag and Drop the
dialog-flow-intents.zip
(or clickselect file
) - Type
RESTORE
in the text input (It has to be upper case, I've tested it. Otherwise it wouldn't sound that cool, right? 😎) and click therestore
button - Click
done
after it is finished.
- Install the dependencies using yarn or npm
cd functions/
yarn
or
cd functions/
npm install
- Visit the Firebase console
- Log in using your Google Account
- Scroll down and you will find your project created in Dialogflow. Open it
- Click on
Functions
in the sidebar - Click on
get started
- Do not install firebase-tools globally even though Firebase tells you to! Just click next.
- run the following using yarn
cd functions/
yarn run init
or using npm
cd functions/
npm run init
- Choose
TypeScript
using the arrow keys and hitENTER
- Hit
ENTER
6 times - type
n
and thenENTER
- Click the settings icon in the top left corner inside your project
- Select
project settings
- Copy your
Project-ID
- Open up the .firebaserc file and replace the placeholder with your
Project-ID
- run using yarn
cd functions/
yarn deploy
or using npm
cd functions/
npm run deploy
This may take a while...
- Navigate to your Functions in your Firebase Project
- Copy the URL in the
Trigger
coloumn - Open you Dialogflow agent
- Click on
Fulfillment
in the sidebar - Paste the copied URL in the URL Text input
- Scroll down and hit save
- Hit the settings icon
- Go to
ML Settings
- Hit
train
. This will train the ML by the entered trigger words. This might take a time, depending on your system. The training process is indicated by the rolling settings icon.
That's it! You can now test the imported intents and the team dividing script by using the Simulator
in the Actions on Google console!
Every time you are modifying the actual code in functions/src/
you will have to deploy your changes to Firebase. To do that simply run with yarn:
cd functions/
yarn deploy
or with npm:
cd functions/
npm run deploy
- Wait! Actions on Google is sometimes taking its time.
- Repeat the ML training step in 5.8 - 5.9
Feel free to contact me or open an issue!