Bots and especially chat bots are becoming more and more popular since they use one of best interfaces for interaction - natural language.
Microsoft provides tools for building chat bots like Microsoft Bot Framework. There is natural fit between bot development and serveless architecture.
Because of that new service was born - Azure Bot Service.
It allows you to build bots in minutes.
Join us and learn how use Azure Bot Service that combines the power Microsoft Bot Framework and Azure Functions to make bot development easier and faster.
We will cover the following topics:
- Brief review of Microsoft Bot Framework
- Brief review of Azure Functions
- Introduction to Azure Bot Service
- Bot development with Azure Bot Service
Live global broadcast will be available here - https://www.youtube.com/watch?v=QmqoYaYLH3I
5. Microsoft Bot Framework
The Microsoft Bot Framework is a
comprehensive offering that you use to
build and deploy high quality bots for
your users to enjoy wherever they are
talking.
10. Workflow
Write Bot
Register
Connect to Channel
Skype
Web Chat
Direct Line REST API
Publish it
Directory
Review
11. Review Guidelines
Your bot must do something meaningful that adds value to the user
(e.g., respond to basic commands, have at least some level of
communication etc.)
The bot profile image, name, keywords and description must NOT:
Be offensive or explicit;
Include third party trademarks, service marks or logos;
impersonate or imply endorsement by a third party;
use names unrelated to the bot;
use Microsoft logos, trademarks or service marks unless you have permission
from Microsoft;
be too long or verbose. The description should be 8-10 words.
12. Review Guidelines
Microsoft Bot Framework does not currently support payments
within bots.
Your bot may not transmit financial instrument details through the user to bot
interface;
However, your bot may transmit links to secure payment services to users but
you must disclose this in your bot's terms of use and privacy policy (and any
profile page or website for the bot) before a user agrees to use your bot;
You may not publish bots on Skype that include links or otherwise direct users
to payment services for the purchase of digital goods.
20. Files
File Description
Bot.sln The Microsoft Visual Studio solutions file. Used locally if you set up continuous
integration.
commands.json This file contains the commands that start debughost in Task Runner Explorer
when you open the Bot.sln file. If you don't install Task Runner Explorer, you
can delete this file.
debughost.cmd This file contains the commands to load and run your bot. Used locally if you
set up continuous integration and want to debug your bot locally. For more
information, see Debugging C# bots built using the Azure Bot Service on
Windows. The file also contains your app ID and password. You would set the
ID and password if you want to debug authentication. If you set these, you
must provide the ID and password in the emulator, too.
function.json This file contains the function’s bindings. You should not modify this file.
21. Files
File Description
host.json A metadata file that contains the global configuration options affecting the
function.
project.json This file contains the project’s NuGet references. You should only have to
change this file if you add a new reference.
project.lock.json This file is generated automatically, and should not be modified.
readme.md This file contains the function’s bindings. You should not modify this file.
39. Resources
• Azure Storage (used to create the queue)
• Azure Bot Service (your bot)
• logic that receives the message from user
• adds the message to Azure queue
• receives the triggers from Azure Function
• sends back the message it received from trigger’s payload
• Azure Function App (a queueTrigger Azure Function)
• Triggered whenever there is a message in the queue
• Communicates to the Bot service via Direct Line
• Everything is pre-configured
49. Workflow
Package Restore:
cmd prompt -> folder with project.json -> dotnet restore
Run debughost.cmd to load and run your bot
Copy the endpoint that debughost is listening on
Start the framework’s emulator
Paste the endpoint into the address bar
Append /api/messages to the endpoint
Leave the Microsoft App Id and Microsoft App Password fields blank
Click Connect
Start playing with the bot by typing a message
50. Workflow
You can see the logs in the console window
If you want to do breakpoint debugging in Visual Studio 2015
Stop the DebugHost.cmd script
Load the solution for your project
Click Task Runner Explorer at the bottom of your Visual Studio window
Bot loading up in the debug host environment in the Task Runner Explorer
window
Your bot is now live
When using the emulator, responses will be visible in Task Runner Explorer
breakpoints are hit only after clicking Start in the Visual Studio environment
(attach to the Azure Function host (func command from Azure Functions CLI))
For compiling errors check Task Runner Explorer