How can you make a Conversational AI be more responsive?

Srimathi Jagadeesan
hackgenius
Published in
3 min readJan 10, 2023

--

My exploration with the IBM Watson Framework & Webhook.

Hello World! Hope You’re doing extraordinary! I am back with amazing content about responsive chatbots! Why’re you waiting for?! Read this blog article till the very end. In this blog, I’ll be discussing IBM Watson Framework & Webhook.

So here I’ve connected the Watson and IBM Cloud platform.

IBM_Watson

How can theIBM Watson be programmed?

IBM Watson’s mental and logical capacities empower it to answer human discourse, process more information, and return replies to that particular question. It’s been programmed by using Dialog skills. We can integrate Webhook and Watson to process a multiple-domain bot.

What is a webhook?

A webhook in web development is a strategy for expanding or changing the way of behaving web applications with custom callbacks.

For, creating an AI application we have to create a cloud account. I am providing the link, just head over to the link and create your own cloud account. Now, it’s time to launch your assistant!

Open catalog => Search for IBM Watson => Login with your IBM I’d => launch your assistant.

If you’re done with the launching, then you have to start with creating a dialog & search skills. Add more user phrases and train your bot!

When coming to the use case, I have developed a “Cat-fact bot”. Here I’ve used Ninja Cat fact API. Below I have inserted the code, where you can connect Cat fact API with Watson services.

Node_js

As you can see, we got the correct response:)

let rp = require('request-promise')
function main(params) {
const options = {
uri: "https://catfact.ninja/fact",
json: true
}
return rp(options)
.then(res => {
return { extract : res }
})
}

And now, you will get an endpoint just click that & copy your web action URL, the last step is to connect the URL with Watson.

That’s all done, we have to make an integration. As of now, I have integrated a bot into the website. Let me provide the front end Code:

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Chatbot</title>
<link rel="stylesheet" href="style.css">
</head>

<script>
window.watsonAssistantChatOptions = {
integrationID: "b33e16b4-6122-4c07-b7b0-0cc771636435", // The ID of this integration.
region: "eu-gb", // The region your integration is hosted in.
serviceInstanceID: "649fb444-33ef-49e7-9c8f-25a237018794", // The ID of your service instance.
onLoad: function(instance) { instance.render(); }
};
setTimeout(function(){
const t=document.createElement('script');
t.src="https://web-chat.global.assistant.watson.appdomain.cloud/versions/" + (window.watsonAssistantChatOptions.clientVersion || 'latest') + "/WatsonAssistantChatEntry.js";
document.head.appendChild(t);
});
</script>
<body>

<meta name="viewport" content="width-device-width, initial-scale=1">
</body>
</html>

I have attached the snap of the chatbot response, kindly check it out.

Bot_Respone 01
Bot_response 02

User prompt →Hey bot, I need some cat fact

Bot →Cats respond most readily to names that end in an \ee” sound.””

User prompt →Thanks bot!

Bot → It’s my pleasure!

This is how the chatbot works! If you have any queries you can comment! Thanks a ton for reading my blog!

Keep listening! I’ll be providing more content related to AI chatbots, RPA & Machine Learning. Happy Automation!

Automation!

--

--

Srimathi Jagadeesan
hackgenius

Conversational AI || Mentored 500+ Students || Bot Builder|| Tech blogger|| Technical Trainer || Self learner.