Here is a ready to use JAICF bot template that can be run locally or deployed to Heroku server and connected to Google Assistant.
You can use this template locally on your PC or deploy it on Heroku server.
To run this project locally just create a new project from source codes in IntelliJ IDEA and run Server.kt
.
This will start the server on port 8080.
You can then propagate your local instance to the Internet using ngrok.
And then run ngrok http 8080
in the terminal to obtain public URL.
Copy this URL then and use it as a fulfillment URL in your Dialogflow agent (see below).
Just click on the button below to deploy this template on Heroku server.
- After deployment open the app and copy the URL of the app to clipboard.
- Then go to Dialogflow, create a new agent and setup a fulfillment URL.
- Enable fulfillment for every intent in you agent.
- Click on Google Assistant link on the left side bar to create a new Google Assistant Action connected to your Dialogflow agent.
- That's it! You now can start the app and see how you server responds with some responses.
Please make the next steps to upload your changes on Heroku.
Install git and Heroku CLI. Run a terminal (or console) on your machine and type
heroku login
heroku git:clone -a <your Heroku application name>
cd <your Heroku application name>
git remote add origin https://github.com/just-ai/jaicf-template
git pull origin master
You have to do these steps only once.
Once you are ready to upload your changes to Heroku, just type
git add .
git commit -am "some comments"
git push
Heroku will build and deploy your changes automatically.
You're welcome to join a Slack community to share your ideas or ask questions regarding the JAICF usage.