Botbuilder-js: [BotBuikder-AI] QnAMakerEndpoint generation in QnAMakerDialog differ from BotBuilder-DotNet

Created on 10 Mar 2020  路  3Comments  路  Source: microsoft/botbuilder-js

Versions

What package version of the SDK are you using. 4.8.0-preview-109324
What nodejs version are you using. v10.8.0
What browser version are you using
What os are you using. Windows 10 Pro

Describe the bug

The way that QnAMakerDialog handles the generation of QnAMakerEndpoint is different in BotBuider-JS than it is done in BotBuider-DotNet.

In DotNet, the QnAMakerEndpoint receives directly the hostname as parameter. However, JavaScript uses string interpolation to generate the host (https://${this.hostName}.azurewebsites.net/qnamaker).

We thought that better alternatives would be:

  • Do away with the string template
  • Modify the template to just https://${this.hostName}/qnamaker

Being tied to a string template makes it hard to work with. For example, we have the whole URL in the cognitivemodel.json, such as https//example-qnahost-5vkhuvk.azurewebsites.net, but there is no easy way to get simply example-qnahost-5vkhuvk. We had to end up using new URL(value.host).hostname.split('.')[0] to obtain what the template expects.

To Reproduce

Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior

We expect it to work similarly as the QnAMakerDialog in BotBuilder-DotNet.

Screenshots

The difference in the implementation between BotBuilder-DotNet and BotBuilder-JS
image

How the endpoint is generated by passing the whole hostname
image

Additional context

This was originated by porting the BotFramework-Solution's MainDialog with the new integration of QnAMakerDialog.

Another downside is that it would not be compatible with Azure Goverment domains as it has the azurewebsites.net hardcoded with no way to change it to azurewebsites.us.

[bug]

customer-reported Bot Services customer-replied-to R9

Most helpful comment

This looks like a difference and we will look into how we fix this in our next release. It is a potentially breaking change. Thanks for bringing it to our attention.

All 3 comments

This looks like a difference and we will look into how we fix this in our next release. It is a potentially breaking change. Thanks for bringing it to our attention.

This looks like it would be fixed by https://github.com/microsoft/botbuilder-js/pull/1999

PR merged, issue is fixed now.

Was this page helpful?
0 / 5 - 0 ratings