1
votes

qnamaker.ai is in GA now, so I wanted to set up a new bot service for a new knowledge base.

The new bot service with QnA does not have the new settings (QnAKnowledgebaseId, QnAAuthKey and QnAEndpointHostName), only QnAKnowledgebaseId and QnASubscriptionKey (as in Preview version). So I'm not seeing this: https://docs.microsoft.com/en-us/azure/cognitive-services/qnamaker/tutorials/create-qna-bot#connect-your-qna-maker-knowledge-base-to-the-bot

Using North Europe. Should I try somewhere else? Or should I just add the new fields?

1
Is this for a C# bot? - Steven G.
Just add the new app settings manually. - Eric Dahlvang
If you message the bot without these settings configured, the default response will be something like: "Please set QnAKnowledgebaseId, QnAAuthKey and QnAEndpointHostName (if applicable) in App Settings. Learn how to get them at aka.ms/qnaabssetup " - Eric Dahlvang
Steven G: Yes, C#Thanks - John Gotze
Thanks Eric, that worked. Just got confused about the preview-like fields, Added manually, and got my bot working. - John Gotze

1 Answers

1
votes

If you check your bot code in the online code editor, you will find that it gets value corresponding to the key from application settings by using Microsoft.Bot.Builder.Azure.Utils.GetAppSetting method, something like below.

var qnaKBId = Utils.GetAppSetting("QnAKnowledgebaseId");

After you manually add required fields in App settings, the bot can get required parameters to QnAMakerService for QnAMakerDialog, and you got the bot working.