The C# BotBuilder SDK supports a really cool thing call FormFlow. With this, you can write a C# class which is used as a base for a dynamically generated series of question/answer pairs, in order to fill the properties of this class. For instance, do you want to create a burger ordering bot? Just add a enum for BreadOptions, an enum for Toppings, a choice of SauceOptions etc. This is a really cool feature of the C# BotBuilder SDK which allows you to quickly develop a chatbot with predefined rules and flow. As the Node.js BotBuilder SDK lacks this functionality, I tried to replicate it since I needed it for a simple project I’m building. Meet formflowbotbuilder.
A few days ago, I was pitching Bot Framework to an interested party, when a question came up: “Does the Bot Framework support AIML files? We have a lot of them and we are wondering whether we could use them”. Honestly, I didn’t have a clue what AIML is, so I decided to run a quick search.
Turns out that AIML stands for Artificial Intelligence Markup Language and, as Wikipedia nicely mentions it, it is an XML dialect for creating natural language software agents. AIML was used to power Alice Bot back in 1995 (this was one of the first chat bots available to the public). Moreover, AIML powered a discussion with Captain Kirk of Enterprise (ho there, Star Trek fans!). Alice AIML files are open source, you can find them here.
In this blog post we’ll discuss how we built a Bot for ParkAround using Microsoft Bot Framework and hosted it in Azure platform.
ParkAround is a prominent startup in Greece which allows you to book your place in hundreds of car parks in the cities of Athens/Thessaloniki as well as the airports of Barcelona and Malaga. We worked with ParkAround to build a Bot that allows the user to book a parking spot at the airports of Athens and Thessaloniki. You can currently chat with the Bot on Facebook’s Messenger platform, whereas support for other channels (e.g. Skype) will be rolled out in the next few weeks.
Bot has the name of “Mitsaras, the parking assistant” (“Mitsaras” being the folk/friendly name for “Dimitris”) and you can chat with it here: https://www.messenger.com/t/parkaroundbot. Beware, bot currently uses Greek language only since it targets Greek audience for now. So, don’t get confused if it’s all Greek to you!
To develop the bot, we used Microsoft’s Bot Framework which allows you to create a bot that will interact with various conversation channels, such as Messenger, Skype, Slack and other services. Bot Framework supports a REST API and has two SDKs, one for .NET and one for Node.js. As most Microsoft SDKs nowadays, both of them are open source. If you aren’t acquainted with Bot Framework SDK, please take a look at the extensive documentation in order to better understand the code segments listed below. Also, ParkAround is a BizSpark startup, so we naturally chose Azure App Service PaaS platform to host the bot, so we can easily scale up/out if needed.
Last but definitely not least, before we continue with bot’s internals, we should mention that this work is a collaboration between myself, my colleague Sophia Chanialaki and ParkAround’s CEO, John Katsiotis.