TaswarBhattiMVP
3,416 views
17 slides
Jun 13, 2017
Slide 1 of 17
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
About This Presentation
Talk given in #Ottawa Meetup Group https://www.meetup.com/ottawaitcommunity/events/235920172/
Want to learn what bots and Microsoft Bot Framework can offer? The Microsoft Bot Framework provides just what you need to build and connect intelligent bots that interact naturally wherever your users are t...
Talk given in #Ottawa Meetup Group https://www.meetup.com/ottawaitcommunity/events/235920172/
Want to learn what bots and Microsoft Bot Framework can offer? The Microsoft Bot Framework provides just what you need to build and connect intelligent bots that interact naturally wherever your users are talking, from text/sms to Skype, Slack, Office 365 mail and other popular services.In this session we will go over building a Bot using the SDK and Bot Connector
Size: 2.17 MB
Language: en
Added: Jun 13, 2017
Slides: 17 pages
Slide Content
Introduction to Bot Framework Taswar Bhatti @ taswarbhatti http://taswar.zeytinsoft.com
What is a Bot? In this context Microsoft Bot Framework, bots are computer assistants or think of it as just a web api (ASP.NET Web App) Bots appear in your favorite messaging app including Facebook Messenger and Skype You use bots for booking flights, hotels, ordering takeaway and much, much more Purchase Request Api to build commerce enabled bot
Not, not this Bot!
Bot Framework Overview The Microsoft Bot Framework consists of: Bot Builder SDK(.NET, Node.js, REST Api ) Bot Framework Emulator for Windows, Linux and Mac Bot Connector Developer Portal (http://dev.botframework.com) Bot Directory
High Level view of Bots
Bot Connector
Deep Vision of Bot
An Echo Bot Code [ BotAuthentication ] public class MessagesController : ApiController { public async Task< HttpResponseMessage > Post([ FromBody ]Activity activity) { if ( activity.Type == ActivityTypes.Message ) { ConnectorClient connector = new ConnectorClient (new Uri( activity.ServiceUrl )); // return our reply to the user Activity reply = activity.CreateReply ($"Echo { activity.Text }"); await connector.Conversations.ReplyToActivityAsync (reply); } else { HandleSystemMessage (activity); } var response = Request.CreateResponse ( HttpStatusCode.OK ); return response; } }
Bot Emulator The Bot Famework Emulator is a desktop application that allows bot developers to test and debug their bots on localhost It is supported on Windows, Linux and Mac
Bot Emulator Screenshot
Demo Bot Framework
Bot Builder Dialog and Sessions Bot builder uses dialogs to manage a bot conversation between a user Session Objects are passed to the dialog handlers Session Objects are the primary mechnics between bots and users
Types of Dialogs Prompts – Text, Confirm, Number, Time, Choice, etc Waterfall dialogs – collection and use sequence of steps User Data – Store data of user, conversation (private data) Payload max is 32k Intent Dialog – listen to keywords or phrases using NLP ( e.g LUIS) Attachments and Cards – For Rich Objects (media or images)
Demo Search Image and Card Using cognitive vision api
Guideline for bots Don’t send a bot to do a webpages’s job Bots are just apps Don’t abuse Natural Language Processing Sometimes buttons do everything you need Its all a matter of User Experience
Resources Microsoft Bot Framework Resources ( http://aka.ms/botresources ) LUIS ( https://www.luis.ai ) Azure Trail ( https://azure.Microsoft.com/services/bot-services ) Books (Building Bots with Microsoft Bot Framework PACKT) Books (Programming the Microsoft Bot Framework MSPress) An introduction to Microsoft Bot Framework