Botbuilder-js: QNA Maker Dialog Active Learning title is not being set to value passed in

Created on 24 Mar 2021  路  2Comments  路  Source: microsoft/botbuilder-js

Github issues should be used for bugs and feature requests. Use Stack Overflow for general "how-to" questions.

Versions

What package version of the SDK are you using. 4.12.0
What nodejs version are you using 14.5.1
What browser version are you using NA
What os are you using Windows

Describe the bug

Give a clear and concise description of what the bug is.
Adaptive learning text is not being set to what was passed in

To Reproduce

Steps to reproduce the behavior:
create QNA maker dialog passing in "Which question better matches your request?" for the adaptive learning title
Run dialog and you will receive "Did you mean:" for the adaptive learning text

Expected behavior

Give a clear and concise description of what you expected to happen.
Expect the adaptive learning title to be what is passed into the dialog

Screenshots

If applicable, add screenshots to help explain your problem.

Additional context

Add any other context about the problem here.
It appears the adaptiveLearningCardTitle is set to the defaultCardTitle when you pass in a text string.

bug customer-reported Bot Services customer-replied-to needs-triage

All 2 comments

@tomSauret847 to clarify, when you say "adaptive learning", you mean "active learning" correct?

Additionally hmm...looking at the SDK code, you're right it does seem like you can't get your custom active learning card title populated and instead are stuck with the default if you try to pass the custom title via QnAMakerDialog constructor:

https://github.com/microsoft/botbuilder-js/blob/main/libraries/botbuilder-ai/src/qnaMakerDialog.ts#L303


I'll get around to fixing this after working on a different issue (migrating ADAL to MSAL).
In the meantime for a workaround, if you want to use a custom card title, you can simply assign your custom card title not in the constructor.

    const myActiveLearningTitle = new StringExpression('Which question better matches your request?');
    const qnaMakerDialog = new QnAMakerDialog(knowledgeBaseId, endpointKey, endpointHostName, noAnswerActivity);
    qnaMakerDialog.activeLearningCardTitle = myActiveLearningTitle;

image

Thank you @Zerryth the "active learning is what I was referring to. Thank you for the work around I will implement it for right now. We are using multiple QNA makers in different languages so this is a must for our application.

Was this page helpful?
0 / 5 - 0 ratings