Building a Weather Bot using Bot Framework Composer- Part 1
What is a Bot Framework Composer?
Bot Framework Composer is an open-source visual authoring canvas for developers and multidisciplinary teams to build bots. Composer integrates language understanding services such as LUIS and QnA Maker and allows sophisticated composition of bot replies using Language Generation. Composer is available as a desktop application as well as a web-based component.
See the documentation here — https://docs.microsoft.com/en-us/composer/
Let’s start building a basic weather bot using the Bot Framework Composer.
Now, let’s start creating our Bot
Creating the Bot
The first step in creating a bot with the Composer is to create a new bot project. This will create a new folder on your local computer.
- Launch the composer
Trending Bot Articles:
On the Home page, select the New icon.
In the displayed Create a bot project form, enter the following information:
- Name. Enter the name WeatherBot. Notice that spaces and special characters are not allowed in the bot’s name.
- Description. Enter A friendly bot who can talk about the weather.
- Location. Select the location on your computer where to save the project.
- Click OK.
- Select the Greeting trigger in the Navigation pane on the left. In the Authoring canvas, the related conversation flow is displayed.
6. To help keep bots organized, you can rename any trigger to something that better describes what it does.
As an example, in the Properties panel on the right, rename the trigger from Greetings to Welcome User.
7. Now, it’s time to make the bot do something. Let’s instruct it to send a simple greeting to the user. In the Authoring canvas, select the existing Send a response action. Its properties will appear on the right in the Properties panel. This action has only one property: the text of the message to send.
8. Type a welcome message into this field such as:
Hi! I’m a friendly bot that can help with the weather. Try saying WEATHER or FORECAST.
It is always a good idea to have your bot introduce itself and explain its main features.
You can start adding functionality to your bot by adding Actions to the Welcome User trigger. You can do this by selecting the plus (+) icon in the Authoring canvas, at the desired location in the flow.
9. From the displayed list of actions, select the appropriate action.
Start your bot and test it
Now that your new bot has its first simple feature, you can launch it in the emulator and verify that it works.
- Select Start bot in the upper right-hand corner of the screen. This tells Composer to launch the bot’s runtime, which is powered by the Bot Framework SDK.
2. Once the bot’s runtime has started, the Local bot runtime manager will open. You can also select the icon to the right of the text Restart bot, as highlighted in the following image, to open and close the Local bot runtime manager.
3. Select Test in Emulator in the Local bot runtime manager. This will open your bot in the Emulator.
Soon the Emulator will appear, and the bot should immediately greet you with the message you just configured:
4. When you are done, you can stop the bot by selecting the Stop Bot button in the Local bot runtime manager.
Finally, we have successfully created a bot using Bot Framework Composer!
Reference — Microsoft Tutorial
Don’t forget to give us your 👏 !
Building a Weather Bot with Bot Framework Composer was originally published in Chatbots Life on Medium, where people are continuing the conversation by highlighting and responding to this story.