GSOC 2019 project
Requirements:
- Ngrok to connect the dialog flow to the webhook
- KML API for liquid galaxy, configured and working
The server needs to be configured on the Liquig Galaxy MASTER
clone the repository and get into, then install all npm dependencies.
git clone https://github.com/xemyst/Google-Assistant-API-for-liquid-Galaxy
cd Google-Assistant-API-for-liquid-Galaxy
npm install
create the .env variable:
touch .env
and set the following variables:
LG_OCTET= 'the octet of the galaxy network'
VIEWSYNC_PORT= 'viewsync network port, it use to be 45678'
PORT=' the port where you want to run your api'
KMLSERVERADRESS='the address (ip + port) of the machines who runs the KML API SERVER '
now you can run the webhook:
node index.js
Now open the ngrok:
ngrok http "the webhook port"
Ngrok will show you a black screen with the url of your current session, save the https link, you will need it for the next steps
- create new project in the dialog flow console.
- Go to: setting -> Export and Import
In the folder where you clone the repository you will find a folder called "DIALOG FLOW PROJECT", get into.
There you will find a zip file called Liquid-Galaxy.zip
-
Upload the zip file into the UI by doing click in IMPORT FROM ZIP
-
Go to the fullfillment window
-
in the URL field paste the ngrok link, and add '/assistant' like that:
https://f47fa87c.ngrok.io/assistant
- click in the save button
- ENJOY THE API:)