I am trying to call QnA Maker on a waterfall dialog step.
How do I call it from this watterfall
step, do I need to set up QnA On the waterfall step, do I need to call QnA from a LUIS intent, what can I do?
I need it to get the first result from the QnA using the step context from the previous question.
Can anyone help?
Code:
private async Task<DialogTurnResult> QnaAsync(WaterfallStepContext stepContext, CancellationToken cancellationToken)
{
var response = await qnaMaker.GetAnswersAsync(stepContext);
// use answer found in qnaResults[0].answer
return await stepContext.PromptAsync(nameof(TextPrompt), new PromptOptions { Prompt = MessageFactory.Text(response[0].Answer)}, cancellationToken);
}