The backend for talking to DialogFlow API using Node.js Client SDK.
Steps to follow
-
Create a new agent in dialogflow. This will create a project in your Google Cloud Platform. You can see its project ID in the settings of your dialogflow agent. YOu will need this soon.
-
Next, follow the steps giver here in "Before you begin" section.
The authetication set up is a bit tricky so I'm leaving quick to point you in the right path if you get lost.
You have to create a service account with appropriate access and then credentials for it. Download private key as json file and store it anywhere safe on your system. 3. Fork the repo and clone your fork
-
Run
npm install
oryarn
in root directory. -
Make a .env file in the root directory with format as below:
PROJECT_ID = '<project-id>'
GOOGLE_APPLICATIONS_CREDENTIALS='full/path/to/client_secret.json'
PORT=<port-no>
Port is optional.
- Run
npm start
See the issues and stay tuned to the other repo (AskMeAnything) as well :)