Google Dialogflow

Shwetadabgar
Analytics Vidhya
Published in
4 min readNov 3, 2020

--

  1. Login to google dialoflow using this link: https://dialogflow.cloud.google.com/
  2. Create a new Agent.

3.Lets create the same 3 intents which was created in lex(A bot for using medium app) and give sample responses in response section. But other wise you need to enable webhook for the intent in the Fulfillment section if the bot response is configured through backend adapter.

For links to be clickable and have database operations in bot or a good look and feel like carousals will need a nodejs channel adapter to be created.

4. Synonyms for a word can be adding Entities.

Once you click on Create new, it takes you to the entity creation page, add synonyms to the word. You can also use built-in entities for numbers and others.

After adding training items map all the entities for the intended word so that you need not duplicate the utterances as it replaces the entity synonym words.

5.You can provide input context and output context in the context section, to make them work like follow ups. So the output context given here I will be giving it as input context in become_a_member. and the input context of Stories_in_medium intent i will give as output context in Default welcome. So this creates a flow from default_welcome to become_a_member, where you reach to the next intent from the previous intent only, you cannot directly the intent.

5. You can directly create a follow up as well which will auto fill the context part. Follow up can be selected of different types.

Generate the json file with secret keys

6.If you click on the gear icon here it will take you to the settings page. You can get the secret keys and project name details json file downloaded which can be used for your adapter configuration for the bot using dialogflow.

Click on the project name.

7.This will take you to the google cloud page. You can navigate to IAM & Admin and service accounts

8.Create a new service account. While creating add the role as dialogflow API Admin.

9.Once the account is created click on the 3 dots at the end to create key and generate the json file.

10.These keys need to be used when you write a nodejs code to setup an adapter using dialogflow api.

Lets discuss about Microsoft LUIS in the next article.

--

--