Home > front end >  Problem with Azure Bot with QnA Maker using Bot Framework SDK V4
Problem with Azure Bot with QnA Maker using Bot Framework SDK V4

Time:04-06

I tried to follow enter image description here

Tesing On PostMan:

You can skip this part if you think that you are getting expected response on QNA portal

enter image description here

Tesing On Emulator:

enter image description here

Note: Once you are done up to this point as expected you are ready to deploy your bot on azure.

Bot Web App Service on Azure:

enter image description here

Note: Copy the URL which has been marked red. It should be like https://YourBotServiceName.azurewebsites.net

Publish Your Bot From visual Stuido:

enter image description here

Note: The app service you have created earlier you should get that service on app service instance menu item like below. Select your app service and click on Finish

enter image description here

Azure Bot:

Now you need to register your azure bot under azure bot registration pannel. Like below:

enter image description here

Steps: 1 Go To Azure Portal Create a resource Blade

enter image description here

Steps: 2 Type Azure Bot Click on Create then fill-up the form as below: And click on Review Create then click on Create. Wait until the deployment finish.

enter image description here

enter image description here

Note: You can get appId and App Secret by creating App Registration Azure Active Directory as below:

enter image description here

Steps: 3 Once the deployment finished, click on go to resource it would lead you to below page.

enter image description here

Note: Point to remember, the document you were following it seems that you didn't follow this steps. Becasue recently azure bot has a update which is Azure Web App Bot is deprecated but the document you were follwing is little older. So you propably missed this very important steps. enter image description here

Configure Azure Bot Service URL:

This is the steps you missed on your bot which is very important to interact with your web app service and Azure Bot other than bot cannot recognize the interaction between web app service to Bot

So now click on configuration under settings menu the URL you have copied earlier from your Bot web app service like below

enter image description here

paste here it should be like this format https://YourAppService.azurewebsites.net/api/messages Should be like below:

enter image description here

Final Test On Azure Web Chat:

enter image description here

Note: If you are still having issue then go to channels on your Bot and check if you are getting any error like this. In that case check your azure active directory app Id , and app secrect is correct.

enter image description here

enter image description here

In addition if you need official QNA sample you can download from here

Hope it would guided you accordingly

CodePudding user response:

To get you started you might also try this approach:

  1. Create a new QnAMaker Knowledge base with at least one question and answer pair.
  2. Train the KB and Publish it.
  3. After you published the KB, you will see a button labelled Create Bot
  4. Click this button, it will create a web app bot. You will be able to select the language you prefer
  5. Open the web app bot and use Test in Webchat to test it.

After these steps you will have a working chatbot running on Azure. After that you can download the sourcecode and add the stuff you need.

Remark: Web app bots are officially depreciated but this shortcut is still working. And existing web app bots will be supported.

  • Related