Azure Bot Service Tutorial | Create Chatbots in minutes

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
did you know that you can use our robot service to create conversational chat BOTS a new way of interacting for your application and more natural way with the tools that your users already have today a quick introduction into this service so stay tuned okay so let's talk about the bot service first of all to talk about both service we need to understand what bot is so a boat is simply an application an application that converses with users through text graphics or speech and a pod service is a service with an adder that comes together with something called bot framework to that together they provide tools for you to build test deploy and manage intelligent chat BOTS in one place so those this is the high-level description of what this really is but we'll talk about a bit more in detail so first of all what do you really get here you get a bot framework as decay so this is a SDK written in both dotnet and nodejs for you to develop your BOTS you also get tools through from the bot framework they are for you to use to do end-to-end bot development like and both and later etc and also you have both frameworks service in short BFS this is a middleware service that translates all the external channels for you during the conversation so you can actually integrate with multiple services and lastly you also have both deployment and channel configuration pages in order for you to stim line the process and have a single place to manage all of those so I talked about this bot form of service it's a bit complicated when I said it so let's look at this picture if you for instance have five channels like email facebook messenger Skype slack and maybe it's just web application a web chat a bot framework service is a channel that integrates all of those external channels translators their unique messaging patterns into a single message that is understandable by your bot so basically this is a unification service for all those channels so that they can send whatever they need to send and this translates to a simple message for your bot to handle so the code that arrived bot is always the same for almost all the channels so how does the bot work whenever a user connects to your bot through some channel it first connects to that channel when he does that and a message is sent to brought for him or service which then sends a message to report that the conversational conversation was just updated and users don't a channel after that a bot needs to join the channel as well and when that happens you are now ready to start conversation so when you say hello there on that skype channel this message is being sent to pod for your service which then is sent a message hello to your bot and then of course all the magic that you need to happen happens now so you can process this message integrate other services whenever this happens or simply in case of Mac echo application send a message you said hello back to your channel so that user sees is on the chat a message you said hello and of course when that is done a channel notifies both frame of service that it received a user received at message so responses being delivered back to your bot and a bot closes the conversation saying everything was processed fine and this is a highly simplified version of how the bot works but this is what it really is once conversation is updated and you're in the conversation together with your bot a simple post calls sending messages back and forth between you and the bot additionally both service delivers multiple integration for instance the most common ones are Q&A maker a service that allows you to import question and answer files for you to integrate so users can actually ask questions using natural language and get most answers additionally you have Lewis which is language understanding intelligent service this is a simple natural language processor that allows you instead of typing hard comments or clicking buttons for users to use their natural language in a chat and you understand that and do some actions based on that and of course since you are coding this using.net or JavaScript you can use any restful service for integration purposes one of the most common scenarios is information chat bot so you can connect your mobile devices consumer pcs through those channels that we were saying and then use Q&A maker service to answer most common question imagine this being like a Vikki so a bot that answers question most typical questions of your users you additionally can do IOT scenarios so you users can type the report and control their devices through again both service and language understanding processing and of course you are always allowed to do ecommerce so create a application that will allow users to either your speech servers or their mobile devices and then connect to your structured data through all those integration patterns so I have three demos for you today first of all we're gonna create a service and bot service then I'm gonna show you how to develop and test your bot locally and how to deploy this to adder so let's get right to it okay so let's start creating our bot let's hit on plus and type bot and that option that you want is web app pot hit on it hit create and provide the name and this actually is pretty important because this is a bot handle name you will see it in a couple places when you're configuring pot so remember this because this is important I'm gonna call it error for every one pot that name is canceling free so I'm gonna use it you need to provide a resource group as always i'm gonna choose location north europe because this closest to me I think tier is how many premium messages you can actually send a premium message is a dedicated channel some of the channels are considered premium messages if you're just communicating four standard messages the pricing tier doesn't matter I'm gonna select a f0 which is free if you want to understand more about pricing and priming premium messages read more in a pricing details and next you have app name this is actually app service name so this is the name of the service that will be hosting your bot logic next you have a template in a template you have a couple of options first of all you choose the language it's either C sharp or node.js I'm gonna select c-sharp and then you select a template you have echo bot and basic pod currently echo bot is a simple bot that responds with the same message as you send it to it to it just to show you the service and later when you're going to be more advanced choose a basic bot which additionally delivers your language understanding and put analytics which is quite cool stuff but maybe topic for another day and if you're more advanced you always have Enterprise bot virtual assistant language understanding Q&A bolt and more you can actually view samples here this will take you to github and show you more samples so head on and okay next you need to provide app service plan so this is the name of your app service plan I'm gonna also choose north Europe because I want all my services to be close to each other and lastly application insights again choose the same region north Europe and the last option is auto create Microsoft app ID is the Microsoft app registration so that it is globally visible across multiple services if you want to learn about this more read out this belt after this video so hit create and now your boat will be provisioned that will be actually four resources that will be provisioned here therefore this takes between two three minutes so I'm gonna skip ahead my boat was created and I can go to the resource now but what I want to do first is go to the resource group to show you what was created so inside every soul group four things were created a web a bot this is your bot surface resource that is this global single place for you to manage your bot you have observed as planned is the performance plan of your bot you have an app service this is the brains so this is where your code resides and this is where all applications will be hitting and you have application insights for logging and telemetry purposes so if you want to manage your bot go to web app bot and here you have couple interesting options so on the left hand side the most important ones are both management options first of all you have built you will actually go back here in a second but this is the place where you can actually start developing your bot and this is how it will actually let's say guide you through the process of developing your bot next you have tests in a web chat so this is a simple simple web chat that you can use to test your bot and as you see when I joined the chat and an initial initialization what was happening and now boat is ready to start conversation if you remember my diagram this was this part when the conversation update went through that the user joined and after that following about knowing that conversation as well and welcomed me with this hello and welcome message I can actually start typing now if I type hi citizen echo bot it responds echo hi if you want you can start over and of course notice the conversation started faster now because there was no this first in this initialization part and it's really good for you to test that but it's simple way there are better ways I'm gonna show you that in a second but for now this is a very simple way to test the chat bot you have analytics section on the left hand side and because we second ago connected this web app bot to application insights during the creation you have this user retention panel user activities how many users was using it and it will be refreshed in a couple of minutes so later on you're gonna see statistic of your users next you have channels this is one of those more powerful feature and most key features of both service this is a place where you can enable multiple channels have featured channels like Cortana Dyer Klein Microsoft teams Skype but also you have kick slack Facebook and other more popular channels for you to use you just hit through an example would be for instance lucky if you hit on it you get like this couple things that need to provide and there's that very detailed step-by-step instruction just hit on it go to slack configure it and in couple of minutes your bot will be also available on slack is really powerful really great and you don't really have to do anything other just placed in few values and click few configuration settings and lastly you have some settings you can upload an icon change it display a moonroof but provide a description and some more advanced stuff here as well but no need for that right now you can also do some stuff with speech here you can do bot service pricing so you can change the pricing tier of your bot service after the creation but for now let's go into the build section so to build the bot I will show you how to do it right now using dotnet I can actually download the source code since our boat was already provisioned using a standard echo template you can actually download this code and start working from it so it will actually include my application settings inside and download the source code this takes about 30 seconds to 1 2 minutes my down low is ready second hit download bot source code and get my source code downloaded I will close this panel and of course if you want to continue with this demo also hit this get emulator and download both and later because you will need it for further steps but you don't really need install command line tools if you're using Visual Studio code but I will show you that in a second so since I downloaded my source code I can actually go to my downloads folder and extract it so I'm gonna extract it once I do that in that partial comment window I'll let you open this folder and start Visual Studio code here so this is what it's provision out of the box there's a lot of files here don't worry about those at start I'm gonna explain the most important ones because there's a lot of stuff like post-deployment scripts like like a deployment files deployment configuration etc etc but the most important for you is in the BOTS folder is this echo pod file as you see everything is underscored because I need to run dotnet restore this way I will restore all the packages that are within this project and in a couple of seconds squiggly lines disappeared and I cliche can start making changes to my bot so let's change that echo message to message and let's welcome message let's change that to hello Archer for everyone once you save it you can simply run dotnet build and once this is built you can actually hit dotnet run and now your bot is running and running and listening on this address so how you can actually test this in its running it's not a web application is just an API that listens for your messages to do that you need this emulator that I was talking about and I have it open here it looks very similarly to how Visual Studio code works so you need to add a new endpoint provide this endpoint URL and as it says followed by API slash messages so let's type that you need to give it a name I'm gonna call it demo board so this is just for you to understand with pottery connecting to so maybe a local also write that since this is a local host you need to provide an application ID and of course this depends on how your application is written but in this demo you actually need to provide it so to get it you go to app settings and you need to copy/paste the Microsoft app ID and application password once you do that you save the connection you hit on it and open a chat with your bot as you see there a lot of things happen so let's talk about what just happened first of all as you see on the left hand side in the panel a post message was sent that I've connected to to the service and a respond world sent from the service dot hello asher for every one message so a bot also could join the conversation and you can actually reveal everything here if you actually click on it you can see entire JSON files that was sent during the conversation so if I type hi now see that another post message was sent then a service responded with hi my service responded that conversation replay was sent and service finish the conversation can actually click on each one of those to see what was sent entire Jason hi hi it's a plain text it was sent from a channel ID emulator etc and hitting on this one it was sent back to channel emulator and unless it was message hi so using this bot Explorer you can test both locally and remotely but if you're testing remotely you need to install something called and rock if you doing that just Google how to use Angra preferred robot service since Microsoft has pretty good guides for local development you don't need any work at all just for you in function and rock is a simple open-source proxy tool that allows you for both servers in the cloud to communicate with your local and lighter so this is how you test the bots since we tested the bots the last thing we need to do now is to deploy this to the cloud so if we go back here close this file we want to deploy this to the cloud so I'm gonna finish the bugging and I will actually deploy this to cloud to deploy to cloud there are several options to do so I like the one that I used muttering my video on the App Service if you want to understand how did that in a very giggle watch my video on app service but for now you go just to either here you have a panel if you have Accession error account and other up service and you're logged in you will see your subscription on the list when you expand it you will see your app service which hosts your bot and you simply hit right click deploy it web app you need to provide a source folder so this is the pros been debug dotnet core 2.1 and select it will ask you if you want to override current deployment hit deploy and wait about a minute so i'm gonna pulse here and skip ahead so the deployment succeeded so this worked we did a small change let's review that change again so we should see in the portal a new echo message starting with message and hello for archer for everyone so if i go back to my web browser and they'll test a web chat bot I can actually say hey and see what happens perfect everything worked just fine I was able to introduce new changes deploy my pod to the cloud and everything is ready for me to integrate with other channels so now that the pot is ready you have couple of options the first probably you should decide on the channels you should go to channels and decide which channels they want to run probably the easiest for you without any effort and development is to use web chat because web chat channel is running by default you can actually go to edit here and get this embed code using this embed code here you can actually copy this and paste it into any file so I'm gonna go here I'm gonna close Visual Studio I'm going to create a simple index.html file so index.html remove extension and open the jewels to do here once I do that I have my index.html unconfessed paste my bot framework and bad court and it says you just need to paste a secret here so let's get the secret key from here gonna copy/paste this paste in this place save it put it down and open this index.html and say hey as you see we just embedded a simple chat bot in a simple web application in just couple of minutes this is out of the box connector that you can use but there are many more of course you can go down here and you can start enabling another channels couple of cool ones is for of course an email so you can make a bot that responds on in emails maybe analyze the email and do something based on that or you can do SMS type of bots or maybe a team channel but one of the cool ways of doing teams integrations with bots is for instance for other automation so you can have a chat which basically will alert you or you can use to automate your other environment of course here that doesn't end there plenty many more scenarios it's just matter of how you want ultimatum and if you need a conversa conversational tunner for this automation purpose so that users can actually control it in more natural way as you see creating chat bots with other BOTS service is quite easy of course this wasn't really a development tutorial of bot framework itself maybe next time that's gonna be the topic but for today you should remember what service is all about integrating building testing deploying and connecting your chat bot to external services this is what our bot service is that's it for today if you liked the video hit thumbs up leave a comment and if you want to see more subscribe and see you next time [Music] you
Info
Channel: Adam Marczak - Azure for Everyone
Views: 49,841
Rating: 4.9203539 out of 5
Keywords: Azure, Bot Service, Bot Framework, AI, chatbots, tutorial, step by step, Bot
Id: -FHc_lZ6jJY
Channel Id: undefined
Length: 22min 35sec (1355 seconds)
Published: Tue Oct 22 2019
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.