OK, I’m a little late at getting to this but I have just posted the code for my recent talk: Creating Awesome Chat Bots with the Bot Framework and C#.
To all that attended, thanks for joining me. I had a lot of fun preparing and presenting.
The code is here: https://github.com/schwammy/bot-demo
Unfortunately, this isn’t the easiest sample to get running. I think the code serves as a good example of some great things you can do with bots. However, if you want to actually use it, there are several steps that need to be done in advance. I’ve copied the text below from the readme file. As I say in a lot of my presentations, each step is pretty easy. However, putting them all together, especially for the first time, can be tricky. There are lots of good articles and videos on the web already for getting started with Bot Framework (and LUIS and QnA). I suggest reading up a bit and then follow my very basic instructions to get the code sample running.
Contact me if you have any questions or issues. Have Fun!
Before using this code you need to get set up
- Follow the instructions in the Prerequisites section here: https://docs.microsoft.com/en-us/azure/bot-service/dotnet/bot-builder-dotnet-quickstart
- Install the emulator. The link is on the same page as above in the section: “Test your bot”
- You will also need:
- After you create a LUIS account, create a LUIS app. You can leave it blank if you want. TechBashBot.sln contains a file LuisModel.json that can be imported to get started quickly.
- After you create a QnA Maker account, create a QnA service. You can import the questionsn and answers from TechBashBot.sln using the QnAMaker.tsv file.
- After you create your Azure Account, create a Web App Bot. Just add a resource and search “bot”, then choose Web App Bot
Once all of your resources are set up, you need to configure the code:
- Update the web.config file with the MicrosoftAppId and MicrosoftAppPassword for your new Web App Bot
- Update LuisDialog.cs by setting the new LUIS model id and subscription key
- Update QnADialog.cs by setting the QnA Service subscription key and knowledgebase id