Expression Spectrum Machine Language C, C++ C#, Java, JavaScript, PHP, Perl Graphical User Interface Natural Language • Computers need to be told what to do – exactly and unambiguously. • Ever since Grace Hopper, computer scientists have been working to make it easier for humans to express their intentions to computers. Shell scripts, PowerShell Power Platform, Excel RAD tools COBOL
not the one with the most AI solves the user’s needs in the quickest/easiest way This Photo by Unknown Author is licensed under CC BY-SA-NC
Your Bot Web Service External App Web Service LUIS
BotBuilder v3 BotBuilder v4 C#, Node.js Inconsistent naming Monolithic and opinionated Complex dependency trees Opinionated C#, JavaScript, Python, Java Incorporates feedback from v3 Less “opinionated”, more flexible Modular and Extensible Not backward compatible
Bot Framework Channel Service Adapter Middleware Bot
Turn Context A “turn”
demo
Testing your Bot App Service with Remote Debugger Run directly in Azure Attach Visual Studio debugger Bot Framework Emulator Separate download Does not require registration Can connect to bot on localhost Supports speech recognition Send sample Team Member Events ngrok Tunnel Tunnels internet requests to local machine Allows inspection of request/response Free version changes the URL every time you use it (8 hr max/use)
Middleware
Event (C#, JavaScript) Fires when Description OnTurnAsync, onTurn Any activity is received Base class calls the other handlers – if you override w/o calling base.OnTurnAsync(), no further processing will happen! OnMessageActivityAsync, onMessage A message is received Override to handle message activities OnConversationUpdateActivi tyAsync, onConversationUpdate A conversation update is received Eg/ someone enters or leaves the conversation OnInvokeAsync, onInvoke An Invoke activity is received Used heavily in Teams for message extensions, adaptive cards
QnA Maker
demo
• are reusable • can be hierarchical (screens within screens, dialogs within dialogs) Both GUI screens and Bot dialogs: • separate concerns • organize the user interaction
person bot
Waterfall Dialog
luis.ai (UI) REST API REST API
demo
https://dev.botframework.com/ https://www.qnamaker.ai/ https://www.luis.ai/ https://github.com/microsoft/BotBuil der-Samples https://github.com/BobGerman/Bots

Introduction to the Microsoft Bot Framework v4

Editor's Notes

  • #7 Activities are more than receiving messages, and include Typing (user is typing) and ConversationUpdate (members added and removed from the conversation). Text messages are always possible, but beyond that message formats vary by application; Bot needs to deal with that.
  • #9 Explain that setup is in the notes; show templates Crank up the NodeJS echobot in the emulator; explain Show Bot service registration Show Teams manifest Show bot in Teams
  • #10 Emulator download page: https://emulator.botframework.com/
  • #15 Read more: https://review.docs.microsoft.com/en-us/botframework/designing-bots/core/dialogs?branch=design-center