Book Image

Building Bots with Microsoft Bot Framework

By : Kishore Gaddam
Book Image

Building Bots with Microsoft Bot Framework

By: Kishore Gaddam

Overview of this book

Bots help users to use the language as a UI and interact with the applications from any platform. This book teaches you how to develop real-world bots using Microsoft Bot Framework. The book starts with setting up the Microsoft Bot Framework development environment and emulator, and moves on to building the first bot using Connector and Builder SDK. Explore how to register, connect, test, and publish your bot to the Slack, Skype, and Facebook Messenger platforms. Throughout this book, you will build different types of bots from simple to complex, such as a weather bot, a natural speech and intent processing bot, an Interactive Voice Response (IVR) bot for a bank, a facial expression recognition bot, and more from scratch. These bots were designed and developed to teach you concepts such as text detection, implementing LUIS dialogs, Cortana Intelligence Services, third-party authentication, Rich Text format, Bot State Service, and microServices so you can practice working with the standard development tools such as Visual Studio, Bot Emulator, and Azure.
Table of Contents (10 chapters)

Development of WeatherBot code

We have completed setting up LUIS. Now let's develop a bot for knowing the weather of a given geography. We will also see how LUIS can help us in identifying the geography of a given sentence.

This guide is for C# using the Bot Framework Connector SDK .NET template:

  1. Open Visual Studio and navigate to New | Project:
  1. Select Visual C# from the left-hand side template category. From the templates section, you will see the Bot Application template:
  1. Select the Bot Application template, name the project WeatherBot, and then click on OK:
  1. Select the MessagesController.cs file, which is located under the Controllers folder:
  1. Update the Post method to call the Dialogs. For that, add a class called WeatherDialog.cs in to your solution and extend it with IDialog. For that, you have to right-click on your project and select Add | Class...:
  1. Extend the class with IDialog, implement...