Deploy a bot to your website with Azure Cognitive Services and QnA Maker | Azure Developer Streams

Deploy a bot to your website with Azure Cognitive Services and QnA Maker | Azure Developer Streams


(music) (music)>>Hello and welcome to Lux News. Today in the news. Today on Stream I should
say, we will be doing a Microsoft Azure sponsored segment where we will go over
learning about creating bot, we’ll go over the bots again and we will learn to
deploy them onto a website so that you can have your bot
live on your very own site. That’s it for Lux News. Have a great day. (music) So, we are now going to pause
on the game development, we’re going to be creating bots. So we did this before, but
we didn’t put them onto a website yet, so this is
gonna be the full way through. So we’re going to be
using Microsoft Azure. This is a sponsored
segment from Microsoft. Thank you very much. (audience applauds) You guys haven’t heard of this, it’s like a QnA bot, right? So we go to qnamaker.ai. You go through, and you’re gonna have, we’re gonna have to set a few things up so let’s open up the Azure portal too. If you guys are wanting
to do this Azure is, it’s a free subscription
and when you first sign up they actually give you
something like over $200 in credit to play around with
it, so that’s pretty cool. I definitely think it’s
worth checking it out and learning how this stuff works. Here is what the portal
looks like when you log in. Okay, the first thing we
need to do is create a new resource group, a resource group. Add. We wanna make a web app bot. You know what, it will
tell us what we need in a second here. Boyhax, welcome. A maker (mumbles). Oh, it’s ’cause I’m
not signed in isn’t it. Let me sign in. That’s what we need to
make, a knowledge base. That was the word I’m looking for. So, when you sign in, you
now have access to create a knowledge base. So we need to go into
Azure and then create and QnA service, that’s where
it will show us where to go. Yeah, first, don’t quote
me on the exact amount, ’cause I don’t know what
it is Canadian versus US, but it was like over 200 bucks I think. So we’re going to need a resource group. That’s what we don’t have. Resource group we’ll create over here. Here it is, resource group. You guys have any
suggestions, recommendations, on what kind of theme
of a bot we wanna make? Maybe we wanna turn ourselves into bots. I think that would be the funnest thing. Imagine going to a
website and you can talk, people can talk to you and you
can put in all your answers how you would normally
answer the questions. I’m gonna make myself. You guys, if you’re
making, following along, you can make yourselves. Lana bot resource group, let’s do that. Oh wait a second, I put
that in the wrong place. Here it is. Pay as you go. Call it Lana Bot Resource Group. Region, I’m in Canada,
Central Canada, I think that, kinda central, kinda like Eastern Central. That works there, so review and create. And we have reviewed it, now we can create it,
and it’s already done. That was quick and easy. Now let’s go back here and
go to Create a QnA service. Does it show up yet? Yes it does, cool. So we’ll call it LanaBot. What are we making again? QnA service. QnA. We’ll go for the, oh we need to refresh. The free one. LanaBotQnAService and we’ll go with this. So it’s just different
pricing tiers on this, on the search. This is gonna be the URL for it, I’m just gonna call it LanaBot. I wonder if that will be available? No, it’s not. We’ll call it LuxBot’s probably
almost definitely taken. Ha, it’s not! Okay, good. I don’t think we need insights right now, so we’ll create that. And then we can come back
here and now we can create the knowledge base. So I have my log in, ah,
we need to refresh this. Might take a second to show up. So here it is here. Let’s refresh. My log in. I think, there it is. Name your knowledge base. LuxBotKB. And here is pretty cool. You could add it from a
fake you on a website or DOC or PDF just by filling in the thing here, or a filename, that way
you can have all your stuff done ahead of time. This is pretty cool. But you can also do it once you’ve created the knowledge base and then you
can have some of the default stuff taken care of through
their, what do they call it? Chit chat, through Chit chat. Add Chit chat to your knowledge
base by choosing from one of our five prebuild personalities. Professional, friend, witty,
caring and enthusiastic. Which one do we want our bot to be guys? Which one shall we pick today? I can a-zure you it works with Unity. Let’s be, we picked witty last time. Let’s be caring today. You know, let’s have a really kind bot. And then we create it. Oh this happened to me before. It takes a second to
recognize some of the things that we’ve set up. So might need to give it a minute. Let’s go through again. LuxBotKB. There it is. Now it’s recognizing it. While that’s going, I’m gonna
log into my internet hosting. It can be the bot that wants
to be everyone’s friend. Oh, here’s, this is a weird question. If you guys had to make
yourself into a bot, which of those would you pick
to describe your personality? I feel like enthusiastic
might actually be me. I’m a little bit too enthusiastic. So enthusiastic. Okay, so I’m signing into my hosting. So I’ll keep that ready. I have LanaLux.games. It’s like bare, basic website
right but we’re gonna put LanaLux.games slash bot
or something like that for this test, so I’ll
keep my file manager ready. So when we created that knowledge base, it generates all this
stuff from the default personality type we gave it. If someone says anything
like these questions, it will give you this answer. Ask me anything, ask me question, it’s like I can’t think
of anything to ask. I think what we can do
here is add like multiple ways to respond to it. Follow up prompts can be
used to guide the user through a conversational flow. Prompts are used to link QnA
pairs and can be displayed as buttons or suggested actions in a bot. For example, you can
have these links show up in your answer, which is pretty cool. I actually used one the
other day and it set me up with like a meeting with someone. It doesn’t need to be that
way, it should just guide people to the right place. For this one, when it’s
like ask me something, tell me something we’ll say,
the default is I can’t think of anything to ask, we
could say I know everything about you already. That’s not creepy. Our bot’s gonna be super creepy. Cannot be empty. Oh wait, we’ll do the same in both. Oh this is the question, okay, okay. Tell me something, or,
ask me, ask me a question. Save and train. I think my bot personality
would be different, like different from your own personality. My bot personality just hate everyone, aw. So now we can test this. Are we the same age? It says I’m a bot, so I don’t have an age. Now let’s see if this one went in. I wanna make sure that that worked right. Ask me a question. I know everything about you already. Ah. We should make creepy bot. And like it just shows up on a website. People are like hi, I’m
trying to find my way around. And creepy bot’s like, you
already have it within you. You know exactly where to go. Okay, so it’s already got
all this stuff working. Once you’re done adding in
all the things you could possibly answer with, you
know what I haven’t done yet? We could try actually is
adding like ask me a question. Let’s do a new one. A new QnA pair, let’s do something like can you help me look something up? And then the answer is like
I want to add the prompt, so display text linked to QnA. Display text. Oh, here it is. Create new. (sound) Oh, it’s already adding
existing ones, I see. B4cteria, welcome. Question. Let me look at the QnA pairs again. Multi-turn conversation with chat bot. Oh here’s enable multi-term
interaction URLs, cool. So here it is in here. So to link to an existing
question-and-answer pair as a follow up prompt. Oh, so you have to create
a question-and-answer pair. So follow up prompt, please select the row for the question-and-answer pair. A bot that talks
cryptically would be funny. Can you make a bot to troll your own chat? What would be the best Twitch bot to make? I wonder how we went
implement this into Twitch, that would be pretty funny. Okay, we’re gonna keep going here. I wanna like do, create new. Is this gonna give me, I don’t
know, I’d have to do more reading on it I think. Let’s stick to what we’ve got. Regular answers. Oh, let’s put a URL in though. Answer. (sound) Vakvakpixel, welcome. Okay. Let’s save and train. Now, the next step is,
after it’s trained, okay. Publish. Publish. While that’s working
let’s make a, a website. Let’s just have the text Welcome
to the all knowing LuxBot. Welcome to the Bot, that
doesn’t really make sense. Welcome to the home of, to the– (sound) Home of the, Bramvile, welcome. And we’ll go like under here add a three. Please ask your questions below. So, let’s make this our index. And let’s upload that, make
sure we have that working. We’ll replace it once
we’ve put the bot into it. So, I’ve uploaded that
to my LanaLux.games. I put it in the directory bot,
so now when you go to that here’s what we have. Next step. Oh you know it’s bothering me
that it’s not centered though. I’ll just put it in a div and
make sure I center the div. Boop, boop. I’m gonna put my CSS directly in here. For this, just because we’re
just testing this stuff out. Style. Type. All those text styles. It’s got div. Text align center. I have to upload that again, but we’re gonna upload again
when we have the bot it. Here’s our website. Here’s our bot has been
deployed what’s next? Well, I’ll tell you what’s next. Create the bot. So far so good. I’ll stick to that one. QnA Auth key, I didn’t
have to put that in before. That’s interesting. Let’s create and see if
it will put it in for me. What, what? Oh, it’s ’cause it’s over here isn’t it. Key. Okay, we didn’t make one
yet, we gotta create it. Auth key. Key used to authorize
requests to your bot, your QnA knowledge base. I wonder if it says here. Oh we have my knowledge bases. I have this one. Where is the key for it? Settings. End point key, would this be what we want? Let’s try that. Yes, that’s what we needed. Excellent. Okay. Now, I wanna see my bots. Where is my bots? Right here is my bot. Here we go. Channels. So we click on our bot. Click on channels and now
we can get bot embed codes to the channel to get
an embed code for it, copy and paste to website has moved. Okay, let’s go here. We’re going to get this embed code. And we’re going to put it
into our HTML right here. Do a line break. We need to put our secret code. And put that in. And we’ll save it. And then let’s upload it
again to our file manager and our hosting. Oh, we’re gonna do that over here. I’m just gonna remove the one I have. Actually, I think I can just upload it and that will override it. So it’s like file, that
would be the index, yeah let’s override it. And now if we go to lanalux.games/bot. Ha. I think we have it. Hello? Oh, it says hi. Are you Luxbot? Uh oh. No QnA maker answers were found. Okay, we need to add one then. Let’s go to our bot. Our knowledge base. And I think that now
once we add a QnA pair. Are you LuxBot? Of course I am. So save and train. And then publish. Oh hey Reyna, how you doing? We’re making bots. It’s very fun. Welcome to the home of
the all knowing LuxBot. Now we can say are you Luxbot? Of course I am. And it answers. Ah. I can’t wait to completely
automate myself. This is gonna be so nice. Every time somebody wants to talk to me I’ll be like just go to this URL, it’s all, all the information
you need is right there. And that’s it. That’s how you get a bot to
take over your life for you. Now I can focus on other things instead of answering questions. Does anybody in chat have
questions on automating yourself, turning yourself into a bot? I have an issue with my computer. Yeah, go talk to my bot real quick. Is it gonna be like “Terminator”? We can only hope so Sweaty. How do you do a thing? Well, let’s ask the bot. How do you do a thing? I can do stuff like chat
with you or answer questions. Oh, LuxBot. You’re so helpful. (laughs) Yeah, everyone please
redirect all your questions to LuxBot from now on. And thank you. And I think that’s the end of
our review of our bot making. We’ll be doing it again, once a month. If you guys have any
requests on Azure actually, please DM me because I was
thinking about doing a Skype, how to deploy a Skype but
I don’t really use Skype so I don’t know. Maybe Facebook? I don’t use Facebook
either, but it might be cool to learn how to make a Facebook bot. But if there’s something
specific that you guys wanted to know, just send me a message. And, as you guys have
learned in this course, I won’t respond right away
but I will eventually respond. Maybe. If you’re lucky.
(laughs) (music)

Leave a Reply

Your email address will not be published. Required fields are marked *