Description
Version
4.11.0
Describe the bug
The "no match" button to be used when active learning is enabled is shown when active learning is NOT enabled
To Reproduce
Any bot using botbuilder.ai.qna.dialogs.QnAMakerDialog()
will present a question's prompts plus the "None of the above." prompt.
Expected behavior
The "None of the above." prompt should not be present if the QnA KB does not have active learning enabled (or at least there should be a way to disable it)
Screenshots
This answer a number of prompts in the KB which are not the one added by the code in question
Additional context
The offending code lives in botbuilder.ai.qna.dialogs.QnAMakerDialog.__call_generate_answer()
, which instantiates botbuilder.ai.qna.utils.QnACardBuilder
. The method get_qna_prompts_card()
has this particular piece of code:
# Add No match text
button_list.append(
CardAction(
value=card_no_match_text, type="imBack", title=card_no_match_text,
)
)
which should be controlled by some kind of switch when a QnACardBuilder
object is instantiated.