Kylie Bot Part 1 - We Have Lift Off!
Recently I have been seeing a lot of movement around the Microsoft AI technologies and chief amongst these is the Bot Framework. So I've been playing around with the different types of bots and have decided to document my journey through these investigations.
First and foremost, the overarching theme for Kylie Bot (KB) will be that of knowledge search, hence KB ;) I often get asked the same question repeatedly around Dynamics concepts, so my idea is to put a bot together that will automate this and then surface the answers without having to ask me!
To get started, I am going to walk through the process of getting a bot framework template installed and running. I am using Visual Studio 2017 for this, so please adjust this for your environment if you are using previous versions of the product.
Ok, let's get started. First off, I always like to have my projects under source control. This is fairly easy if you have a Microsoft Live address of sorts. Use this address to log into the Visual Studio online portal and create a new project like so:
1. Login to Visual Studio Team Services here
2. Create a new project
3. Enter a project name (Kylie Bot) and description
4. Select a source control type - I prefer TFS so that's what I selected
5. Select a work item process - I chose Agile
6. Click Create and you should be good to go
Great stuff, now that we have that out of the way, we can get ready to start with the actual bot. Firstly, we will need the Visual Studio template for the bot framework. This can be found here.
Place this in the following directory on your local machine: "%USERPROFILE%\Documents\Visual Studio 2017\Templates\ProjectTemplates\Visual C#\"
*Take note of the version of Visual Studio in the above path
*Also be aware that you should save the complete Zip file there unextracted
You will also need the emulator that we will use to test the bot. this can be found here.
The complete Getting Started guide from Microsoft is available here.
Ok, lots of setup work, lets get started with the actual project. We do this by opening Visual Studio and following this process:
1. Connect to our TFS server from earlier (you may need to log in with the same set of credentials from the earlier steps)
2. Connect to our specific directory and project (Kylie Bot)
3. Map and get the project locally
4. Create the actual solution
5. Select the project template to use
Awesome! Now we should have a fully functional bot. To test this, let's run the project and we should be presented with the following:
Looks simple but remember that the bot is essentially a web based API that will provide conversations across a number of channels. One of the channels is the emulator that we downloaded earlier. We are now going to connect the bot and emulator. Leave the Visual Studio project running and simultaneously start the emulator which should look like this:
Select one of the options from the drop down in the end points lists (port 3979 is the default so this should work for you too).
Next you will be presented with the option to connect to a specific bot with a App Id and Password. You can leave these blank for now as we will update them in a later post, and click 'Connect'.
Great, we are now connected. Let's test this by typing 'hi' in the dialog box at the bottom of the emulator and we should be presented with the following:
Fantastic. The bot is working. While it currently doesn't do anything Earth-shattering, we have laid the ground work to be able to extend the Kylie Bot to greater heights.
Look out for part 2 where we will introduce a welcome to the user and some authentication!
**Don't forget to check in your code!