1

I have choosen Nodejs in Azure Webapp bot with Qnamaker and Default No answer modified in online code editor itself, but still it is not reflecting in chat. Even I tried changing the Default answer in app service configuration its not working

chatsnapshot

Ardent Coder
  • 3,777
  • 9
  • 27
  • 53
  • 2
    You may want to read [ask]. – Robert May 28 '20 at 14:24
  • Can you expand your question with screenshots of where in the app service configuration and the online code editor you changed it? I think I have a solution, but want to make sure it's the right one. – JJ_Wailes May 28 '20 at 17:41

1 Answers1

0

You can edit the nodeJs code and change the text.

in "dialogs/qnamakerBaseDialog.js"

You can do:

class QnAMakerBaseDialog extends QnAMakerDialog {
/**
 * Core logic of QnA Maker dialog.
 * @param {QnAMaker} qnaService A QnAMaker service object.
 */
constructor(knowledgebaseId, authkey, host) {

    var noAnswer = DefaultNoAnswer;
    var filters = [];
    super(knowledgebaseId, authkey, host, noAnswer, DefaultThreshold, DefaultCardTitle, DefaultCardNoMatchText,
        DefaultTopN, ActivityFactory.cardNoMatchResponse, filters, QNAMAKER_BASE_DIALOG);
    this.id = QNAMAKER_BASE_DIALOG;
}

}

Take note that:

 var noAnswer = DefaultNoAnswer; 

And / OR you can change the default message in line 15 (or so)

const DefaultNoAnswer = 'Your custom message';
   
xyLuz
  • 178
  • 1
  • 11