Step 7 (Optional): Create Watson Assistant (chatbot) and Consume Watson Discovery Service - ruchikajulka/Tutorial--IBM-Watson-Discovery GitHub Wiki
Consume Watson Discovery Service: (optional)
This is an optional step. In the next couple of screenshots, we will see how we can consume the IBM Watson Discovery API created in Step 7 in IBM Watson Assistant chatbot.
-
From the main dashboard screen (the one which was launched at login), search for “assistant” and create Watson Assistant service as shown in the screenshot below.
-
Now, launch the service to configure it.
-
The first step is to create the intent; here our intent is to get product information by calling Watson discovery service. Give any name to your intent and click “Create”
-
Next, add some example questions as shown below
-
Next step is to configure the webhook, here we will enter the API URL which we received in the last step while creating the cloud function in Step 7.
-
Configure the “dialog”
- add a new node as shown in the screenshot below:
- Enable “Webhooks”:
- Define input and output parameters exactly the same as shown in the screenshots below
Input:
Output:
- add a new node as shown in the screenshot below:
-
Let’s "try now", we will validate if the chatbot is calling discovery service. Make sure your URL as “.json” extension in the end. We can see from the screen below when we asked to chat out a question related to product information; it returned the response from discovery service.