The bot is created with QnA maker and integrated with Microsoft teams. The knowledge base has many questions and answer pairs but the default answer only accepts text when editing it in azure portal here: myBot.scm.azurewebsites.net/dev/wwwroot/Dialog/QnAMakerBaseDialog.cs. What it needs to do is to display the default answer when it finds no answer in QnA KB, in form of a hyperlink instead of plain text but I am not able to find any option where I can do that.
This is the main line that I am trying to modify for display.
public const string DefaultNoAnswer = "Sorry, I couldn't find an answer, please write your query in the ***form*** *(https://www.forms.office.com)* to be added in bot QnA Maker knowledge base";
namespace Microsoft.BotBuilderSamples.Dialog
{
/// <summary>
/// QnAMaker action builder class
/// </summary>
public class QnAMakerBaseDialog : QnAMakerDialog
{
// Dialog Options parameters
public const string DefaultNoAnswer = "Sorry, I couldn't find an answer, please write your query in the ***form*** *(https://www.forms.office.com)* to be added in bot QnA Maker knowledge base";
public const string DefaultCardTitle = "Did you mean:";
public const string DefaultCardNoMatchText = "None of the above.";
public const string DefaultCardNoMatchResponse = "Thanks for the feedback.";
private readonly MyBot;
/// <summary>
/// Initializes a new instance of the <see cref="QnAMakerBaseDialog"/> class.
/// Dialog helper to generate dialogs.
/// </summary>
/// <param name="services">Bot Services.</param>
public QnAMakerBaseDialog(IBotServices services): base()
{
this._services = services;
}
protected async override Task<IQnAMakerClient> GetQnAMakerClientAsync(DialogContext dc)
{
return this._services?.QnAMakerService;
}
protected override Task<QnAMakerOptions> GetQnAMakerOptionsAsync(DialogContext dc)
{
return Task.FromResult(new QnAMakerOptions
{
ScoreThreshold = DefaultThreshold,
Top = DefaultTopN,
QnAId = 0,
RankerType = "Default",
IsTest = false
});
}