Tech in the 603, The Granite State Hacker

QnAMaker Went Live – Bot in a Day

There were lots of exciting things to come out of Build 2018 in early May this year.

Among the many detail level items was qnamaker.ai came out of beta.

As many folks know, I’ve been hosting Bot in a Day Workshops at various Microsoft Technology Centers (MTCs) in the northeast.

With qnamaker.ai going live, came some changes, including a migration from the beta portal to the Azure Portal.

The general instructions for migrating your QnAMaker knowledgebases can be found here:
https://aka.ms/qnamaker-docs-migrate

Unfortunately, you’ll quickly discover that with that change, there’s a breaking change in code that requires _more_ than just upgrading nuget packages.  (You must update all your nuget packages… in fact, be careful, because some of the new dependencies are out of date… so keep updating until everything is flush)

In the live era of QnAMaker, you must also contact the correct host.

After you’ve re-published your migrated knowledgebase in the live environment, you’ll see the familiar deployment details.  Among them will be one new detail, that host name:

This changes what you have to pass in to the constructor for the QnAMakerService in your code.

The way the Bot in a Day Workshop lab sets up configuration is via web.config.  In your bot project, you’ll need to add a new configuration key to the configuration/appSettings section of the file.

Once you’ve done that, you’ll need to provide the parameter to the constructor of the  QnAMakerService…  see the example below.

https://gist.github.com/GraniteStateHacker/a8d86f28a9bbc86c3c249c173e499643.js