Since Build, I've been accumulating Microsoft Framework Bot related tutorials and posts. Today I'm sharing them with you!
LATE BREAKING NEWS: Wanna Build a Bot? In Palo Alto?
At the annual //build conference a few months ago Microsoft launched its bot platform. Bots built using our development tools and AI services enable natural language interaction with hundreds of millions of users across Skype and other services, and do everything from telling jokes to answering questions to booking travel.
Since then, there have been thousands of conversations with bots over Skype, as well as a huge amount of interest from bot developers building all kinds of fun, interactive and intelligent bots.
We're inviting you to come and build an awesome bot at Skype Palo Alto on June 21-22, with the help of the Microsoft bot team and AI experts from Cortana, Bing and Microsoft Research. We'll have sessions on bot best practices, early access to our latest development tools, great food to keep you going and plenty of swag. Plus, the most innovative and engaging bots will compete for the chance to win $5,000.
... and now to the round-up...
Getting started with the Microsoft Bot Framework
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.
The Microsoft Bot Framework (preview): framework enables organizations to build intelligent agents, known as Bots.
Bot Builder SDK
The Bot Builder SDK is an open source SDK hosted on GitHub that provides everything you need to build great dialogs within your Node.js- or C#-based bot.
... [Click through for more]
One of the coolest features that Microsoft present during last months was a Bot platform. At almost the same time other providers like Facebook also have presented their own version of bots, so is something that you must try in the near future.
The official description is:
The Microsoft Bot Framework Connector is a communication service that helps you connect your Bot with many different communication channels (GroupMe, SMS, email, and others). If you write a conversational Bot or agent and expose a Microsoft Bot Framework-compatible API on the internet, the Connector will forward messages from your Bot to a user, and will send user messages back to your Bot.
So basically we are dealing with a smart communication class, which is later hosted in an Azure environment and automatically connected with tons of providers. The latest part is the cool one.
If we want to create the basic structure of a bot...
In my previous post I explained how to create a simple Hello Bot project using Visual Studio 2015. Once we have created this bot (step 1), our next steps are:
- Create Hello Bot app using Visual Studio
- Publish the bot to Azure and register the bot in Microsoft Bot Framework
- Connect the bot to specific channels
So, let’s go with the Azure publish process. This is something very usual so I won’t get into the small step by step details (see the references section). You need an Azure subscription and then you can move on.
Select your project in Visual Studio 2015, get the context menu and select “Publish”. ...
So, we are ready to go for the step 3, and start to use our bot in some channels:
My next natural step was to enable the bot in a Skype account. I was redirected to the Skype Bot Configuration page. As you can see in the following image, the configuration page is very straight forward, with all the necessary steps.
Facebook Channel is similar. We start with a step by step page (Bot Facebook Configuration), where we have most of the necessary steps to publish and connect our bot with a Facebook page. So I decided to create a Facebook App which later will be used in my Facebook page (Yes, I’ve got a never seen Facebook page)...
In the classic movie Wargames from 1983 where a young Matthew Broderick calls up a military supercomputer called WOPR (War Operation Plan Response), he guesses a “secret” password and starts talking to an AI called “Joshua“.
While basic in terms of todays’ theatrical AI escapes into the movies, the idea of Joshua lit a spark in many young minds at that time.
Let’s have some fun and re-create a bit of their dialog, using the Natural Language understanding intelligence of the LUIS.ai service.
- Visual Studio 2015
- Download the Bot Application VS2015 project template located at http://aka.ms/bf-bc-vstemplate
- place downloaded zip file at “%USERPROFILE%\Documents\Visual Studio 2015\Templates\ProjectTemplates\Visual C#”
- Download and install the Bot Framework Emulator at https://aka.ms/bf-bc-emulator
If you just want the code - clone the repo at https://github.com/peterdrougge/Recreating-Joshua-With-LUIS To quickly setup your LUIS app by importing my application, grab and use the json file at https://github.com/peterdrougge/Recreating-Joshua-With-LUIS/blob/master/Luis.ai%20app/Joshua%202.0.json
Step by step guide:
Point your browser to http://luis.ai and sign in. ...
As we make steady progress from a world where the user input to a computer or mobile device consists of flat two dimensional elements controlled by mouse and keyboard it is not difficult to imagine more natural ways to interact with these devices. We have seen speech, gesture, touch etc begin to gradually become more accepted as input modes instead of needing to learn fixed grammars and commands we are moving into a place where more natural modes of conversation are possible. The tech isn’t quite at a place where these conversations are unbounded but can be made to work where we have more specific questions that we’d like answers for. So, I was thinking a question like
“how much sleep have I had in the last two weeks?”
“how many steps did I take yesterday?”
where a specific answer exists and I could ask that question naturally of a computer using the language I might if I were talking to another person. In the short-term this kind of technology could be used to streamline existing customer support functionality. In the longer term this might evolve into a more general purpose human-computer interaction; more conversational.
Microsoft announced their Bot Framework and associated tools at the recent Build conference and to kick the tyres of this offering I thought I would try to answer the aforementioned questions using the Bot Framework and the Microsoft Health API using some of the code I wrote for a previous post (see http://peted.azurewebsites.net/microsoft-health-api-uwp-sample/). The data I can get back via the health API has been collected over time using my Microsoft Band which can be used to track sleep, running, cycling, general workouts, etc.
I’m not going to delve into what the Microsoft Bot framework is as that has been covered here https://blogs.msdn.microsoft.com/uk_faculty_connection/2016/04/05/what-is-microsoft-bot-framework-overview/ – instead I’m just going to cover some of the aspects of this that I found interesting and point to the project I created to get started with bots.
Bots are all the rage and at //BUILD 2016 Microsoft announced their Bot Framework. Let’s see how easy it is to build a bot using the SMS channel powered by Twilio.
Our bot should take a telephone number and reply with information about it using Twilio’s Lookup API. We’ll need:
- Visual Studio 2015 including the latest updates. We’ll be building this on Windows this time, but you shouldn’t struggle replicating this on a Mac or Linux machine.
- A Twilio Account and a Twilio Phone Number –Sign up for free!
- An Azure account which you can get for freehere.
One of the main reasons I love programming is you continue learning new and exciting things. Your job is never monotonous if you are doing what you love! Big software companies like Microsoft, Google, Facebook and many more are all trying to put Innovation at the forefront and working on releasing interesting products, frameworks and APIs.
This article is published from the DNC Magazine for Developers and Architects. Download this magazine from here [Zip PDF] or Subscribe to this magazine for FREE and download all previous and current editions
As a Microsoft developer, I find the Build conference to be one of the most exciting places to learn about these innovations. This year’s Build held in March 2016 was even better, with announcements about conversational intelligence that clubs natural human language, with advanced machine intelligence. New frameworks like the Microsoft Bot Framework and Skype Bot Platform were announced and enhancements to the Cortana Intelligence Suite powered with Microsoft Cognitive Services were made which exposes Intelligence APIs that allow systems to see, hear, speak, understand and interpret our needs with natural communication.
In this article we will take a look at two of my favourites, Microsoft Bot Framework and Microsoft Cognitive Services.
At the weekend I built my first bot. I wanted to see exactly how easy it was to build one from scratch, deploy it and then hook it up to different media “channels”.
Getting started is straightforward – I highly recommend reading the beginners guide here. You’ll need an idea for your bot, some kind of service and then it’s just a case of coding the different responses. Here, I went for simplicity, creating a bot that can work out how long you have until a target/due date. As long as you pass in a valid datetime string, it calculates the duration until that target date in days, hours and minutes. Once the logic was complete (pretty much 1 line of code..), I then deployed the solution locally and hooked it up to the Bot Framework Emulator.
Once I had exhausted my testing (many hours obviously..), it was time to ship it (as Azure API App under https), then hook it up with the different “bot channels”.
With all that, I'll bet you have some ideas of your own, and now that you have the resources at hand, go forth and Bot!
Comments have been closed since this content was published more than 30 days ago, but if you'd like to send us feedback you can Contact Us.