BotBuilder-Samples icon indicating copy to clipboard operation
BotBuilder-Samples copied to clipboard

Fix the sample 49.qnamaker-all-features

Open anusharr opened this issue 6 years ago • 1 comments

Github issues for C#

Sample information

  1. Sample type: [\samples]
  2. Sample language: [dotnetcore]
  3. Sample name: 49.qnamaker-all-features

Describe the bug

While using the sample and testing it locally or on any channel, for any input utterance which shows up the Active Learning Card with 'None of the Above' as one of the options, if the user selects the 'None of the above' option, the bot should respond with 'Thanks for the feedback.'. However, it is responding back with nothing, although it shows up in the emulator logs.

To Reproduce

Steps to reproduce the behavior:

  1. Run the sample 49.qnamaker-all-features.
  2. Test it on the Emulator with utterances that trigger the Active Learning card.
  3. Select the 'None of the above' option.
  4. The bot responds with nothing.

Expected behavior

The bot should respond back with 'Thanks for the response.'

Screenshots

  • While testing the sample on the Emulator:

GHqnaActiveL_LI

  • If we change the line var cardNoMatchResponse = new Activity(DefaultCardNoMatchResponse);

to

var cardNoMatchResponse = (Activity)MessageFactory.Text(DefaultCardNoMatchResponse);

in the GetQnAResponseOptionsAsync method in QnAMakerBaseDialog.cs, then it works as expected and the bot responds back with 'Thanks for the response.'

GHqnaActiveL!

Additional context

Reported by a user in https://github.com/microsoft/BotBuilder-Samples/issues/2172

[bug]

anusharr avatar Feb 05 '20 21:02 anusharr

Created the PR https://github.com/microsoft/BotBuilder-Samples/pull/2177

gurvsing avatar Feb 06 '20 12:02 gurvsing