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

The dialog box contains one or more triggers. Each trigger consists of one or more actions, which are a set of instructions that the bot performs. Dialogs can also call other dialogs and pass values ​​back and forth between them.

In this tutorial, you will learn how to:

  • Add dialogs to the base robot.
  • Run the bot locally and test it.

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

To do this, you create a dialog box that:

  • Prompts the user to enter a zip code to be used as the weather search location.
  • Invokes the external API to retrieve weather information for the specified zip code.
  1. Start the composer.
  2. Select the weather_bot bot project from the Recent Bots list on the home page.
  3. Next, select three points for your Weather_bot bot project. Then click + Add dialog box.
  1. In the popup window, type the following:
  2. Name: getWeather
  3. Description: Get current weather conditions.
  1. Click OK to create a dialog box.
  2. Now select the + button below the BeginDialog dialog event in the middle of the writing pad. Click Send Reply.
  3. To the right of the answer editor, type the following:
  4. Bot Response Copy
  1. We’ll add more features later, like retrieving the weather forecast, but first you need to connect the getWeather dialog to the bot with the trigger.

1. How chat technology can automate customer service

2. Automated vs. live chats: what does the future of customer service look like?

3. Chatbots as a medical assistant in the COVID-19 pandemic

4. Chatbot vs. Smart Virtual Assistant – what’s the difference and why treatment?

You can split the conversation progress into different dialog boxes and then paste them. The following steps explain how to connect a newly created getWeather dialog to the main dialog.

  1. Select the weather_bot dialog box. Then go to the right and change the Sensor Type setting to Regular Expression Sensor.
  1. Now select the three points next to the weather_bot dialog on the left and click + Add New Trigger.
  1. In the Create Trigger pop-up window, enter the following information:
  • Enter both What is the name of this trigger (RegEx) and Enter the text fields of the regex template weather.
  • Click Submit.
  1. Entry
  2. This tells the bot to search for the word weather in any incoming message. Regular expression patterns are usually much more complex, but this is sufficient for the purpose of this example.
  3. In the center of the writing pad, select the + button below the weather trigger detected trigger.
  4. Hover over the dialog box manager and click Start New Dialog Box.
  1. In the dialog on the right, select getWeather. Now your weather robot is connected to the weather trigger.

You can now test your robot and the trigger and dialog box you added to it.

  1. Go to the upper right corner of the Composer and click Start Bot. It may take a while for the bot to start.
  2. Entry
  3. If the bot is still running from the previous tutorial, you can select Restart bot. This will update the bot runtime application with all new content and settings.
  4. The runtime management of the local bot opens. Click Open Chat. The Web Chat screen on the right appears.
  1. Now test different sentences. Note that the bot sends a message to the getWeather dialog if the word weather is in your answer. Otherwise, the bot sends a message to the Unknown Purpose launcher.

LEAVE A REPLY

Please enter your comment!
Please enter your name here