Connect with random people instantly. Find them in the world’s largest group chat. The “Omegle” for people who don’t want to get creepy messages from old people and weird strangers! Free private chat forever, and meet people along the way. Zonish is also great for you to contact your friends anonymously. Zonish.com is also the best way to contact your friends anonymously, without your parents finding out! Our site is pretty much a way for you to launder your chats. Statistically, the chance of someone finding your chat is impossible, unless they are with you in real life, looking at your computer or device. We hope to make the internet a safer and more secure place for everyone to chat on, without the risks of being spied on, by anyone untrustworthy. Talking to strangers online can be sketchy, so if you are ever talking to someone you don’t feel comfortable with, please just leave the chat. If you are reading this, please let us know if you have any ideas, questions, or concerns for our website here: [email protected] Thanks for reading and enjoy chatting!

Building a Weather Bot using Bot Framework Composer- Part 2


The first part of the tutorial can be found here — https://chatbotslife.com/building-a-weather-bot-with-bot-framework-composer-fa62b7cc9623

A dialog contains one or more triggers. Each trigger consists of one or more actions which are the set of instructions that the bot will execute. Dialogs can also call other dialogs and can pass values back and forth between them.

In this tutorial, you learn how to:

  • Add dialogs to a basic bot.
  • Run the bot locally and test it.

Prerequisites

What are you building?

The main function of the bot is to report current weather conditions.

To do this, you will create a dialog that:

  • Prompts the user to enter a postal code to use as a location for weather lookup.
  • Calls an external API to retrieve the weather data for the specified postal code.

Create a new dialog

  1. Start Composer.
  2. Select the weather_bot bot project from the Recent bot list on the homepage.
  3. Select the three dots next your weather_bot bot project. Then select + Add a dialog.
  1. In the pop-up window, enter the following:
  2. Name: getWeather
  3. Description: Get the current weather conditions.
  1. Select OK to create the dialog.
  2. Now select the + button under the BeginDialog dialog event in the center of the authoring canvas. Select Send a response.
  3. On the right in the response editor, enter the following:
  4. Bot responseCopy
  • Let's check the weather.
  1. We will add more functionality later, like retrieving the weather forecast, but first we need to connect the getWeather dialog to the bot with a trigger.

Trending Bot Articles:

1. How Conversational AI can Automate Customer Service

2. Automated vs Live Chats: What will the Future of Customer Service Look Like?

3. Chatbots As Medical Assistants In COVID-19 Pandemic

4. Chatbot Vs. Intelligent Virtual Assistant — What’s the difference & Why Care?

Connect the new dialog

You can break down a conversation flow into different dialogs and then connect them. The following steps explain how to connect the newly created getWeather dialog to the main dialog.

  1. Select the weather_bot dialog. Then go over to the right and change the Recognizer Type to Regular expression recognizer.
  1. Now select the three dots next to the weather_bot dialog on the left and select + Add new trigger.
  1. In the Create a trigger pop-up window, enter the following information:
  • In both What is the name of this trigger (RegEx) and Please input regex pattern text boxes, enter weather.
  • Select Submit.
  1. Note
  2. This tells the bot to look for the word weather anywhere in an incoming message. Regular expression patterns are generally much more complicated, but this is adequate for the purpose of this example.
  3. In the center of the authoring canvas, under the weather Intent recognized trigger, select the + button.
  4. Hover over Dialog management and then select Begin a new dialog.
  1. On the right, under Dialog name, select getWeather. Now your weather bot is connected to the weather trigger.

You can now test your bot, and the trigger and dialog you added to it.

Test the bot

  1. Go to the top right of Composer and select Start bot. It may take a few moments for your bot to start.
  2. Note
  3. If the bot is still running from the previous tutorial, you can select Restart bot. This will update the bot runtime app with all the new content and settings.
  4. The Local bot runtime manager will open. Select Open Web Chat. The Web Chat pane on the right will appear.
  1. Now test some different phrases. Notice that the bot will send the message in the getWeather dialog if the word weather is in your response. Otherwise the bot will send the message in the Unknown intent trigger.

Don’t forget to give us your 👏 !


Building a Weather Bot using Bot Framework Composer- Part 2 was originally published in Chatbots Life on Medium, where people are continuing the conversation by highlighting and responding to this story.