Learn more >
Gurbuz Demiroglu | Published February 12, 2018
Archived date: 2019-05-21
There are many services and open source projects for developing chatbots, IBM’s Watson Assistant service is one of the best environments for implementing one. Some of the features that make Assistant service great are the ease of creation and integration. Let’s develop a chatbot in under 30 minutes using only IBM Cloud services and Telegram as the user interface.
After completing this How-to you will understand how to:
In order to complete this how-to, you will need the following prerequisites:
After installing Telegram on a mobile phone of your choice, search for botFather.
Once found, send a /newbot command and follow these instructions:
Go to the Intents tab then select Add intent.
Add #Hello and #Goodbye intents respectively
Welcome and Anything else nodes come by default. The Welcome node is for the opening message, the Anything else node is for the unhandled text input.
Sample chat dialog should look like this:
When you see the Running state click on Visit App URL.
Visit App URL
Search for telegram from the upper left filter section then drag and drop Telegram receiver and Telegram sender nodes.
Double click on the Telegram receiver node and click on the pencil icon for configuring your bot credentials
Fill the bot-name and token fields according to the bot credentials you created earlier.
In Telegram sender node select the bot credentials you created in Telegram receiver node(example_bot in my case).
Now you have configured the Telegram part on Node-RED. You can test it by connecting the Telegram receiver node to the Telegram sender node.
You can send a message to your bot on Telegram and it will echo the message you wrote. That’s because we forwarded the message payload directly to the Telegram sender.
Now that bot interface is ready, let’s start the integration of Watson Assistant service. In the first part there was a Service Details page for the Assistant service. Go to that page and find the Connections tab.
Content of the function nodes:
Finally, your Nodes should look like the one below:
Click on Deploy button in the upper right, then test your application on Telegram.
Now you have created a chat bot with a Telegram interface. This is a really simple demonstration of developing a bot. Node-RED can make things easy for this use case. The dialog created is very basic, it can be modified and enhanced in respect to your needs.
August 30, 2019
Deploy model-serving microservices from the Model Asset Exchange on Red Hat OpenShift.
Artificial intelligenceData science+
What's on the outlook for chatbots? And what challenges do you face as developer when building one? We discuss this…
Back to top