Reputation: 101
I need to change the default answer in the QnA Maker. I changed it in the configuration of the QnA App Service as seen here:
When I try it in the QnA Maker Portal I get the new default answer:
The problem is that when I try it in a channel like Microsoft Teams(or any other one), the default answer is not the new default answer:
My Microsoft Teams version is 1.2.00.27559 (64-bit)
Upvotes: 0
Views: 880
Reputation: 101
To change the default answer of a QnA Bot in a channel like Microsoft Teams, we have to change it in its source code. To access the source code, head to the Bot App Service and in the left hand blade look for the App Service Editor in the Development Tools tab:
Once there, we have to look for the Dialog folder and open up the QnAMakerBaseDialog file:
Now, we have to edit the DefaultNoAnswer const:
Then, we have to build the solution in the code editor. To do that, click the console icon on the left vertical menu, type "build.cmd" in the console and hit enter. This action should build and deploy your code.
If you have any issues building it this way, you can build it also from the App Service panel, going to Console, under the Development Tools tab(where the App Service Editor was)
Finally, the default answer should be displayed correctly. If not, restart the app service in the Azure portal and the new default answer should work fine!
Upvotes: 3
Reputation: 1854
One more way of changing your default answer to have it reflected it in different channels is to try through the Azure portal:
Once the QnA MAker App Service opens up, click on the Configuration option under the Settings blade on the left pane.
Under Application settings, you will find the DefaultAnswer setting. Double click on the DefaultAnswer option and it will open up the Add/Edit application setting where you can change the value(your default answer) and click on OK.
Click on Save and then Refresh the app service.Now, try testing the default answer on any channel.
Also, note that when you are making the changes in the qnamaker portal, make sure that you save, train and publish the app else the settings may not show the updated changes.
Hope this helps.
Upvotes: 3