【发布时间】:2019-12-04 16:59:46
【问题描述】:
我正在尝试在 瀑布对话步骤上调用 QnA Maker。
如何从 watterfall 步骤调用它,我是否需要设置 QnA 在瀑布步骤中,我是否需要从 LUIS 意图调用 QnA >,我该怎么办?
我需要它使用上一个问题中的步骤上下文从 QnA 中获取第一个结果。
谁能帮忙?
代码:
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);
}
【问题讨论】:
标签: c# botframework microsoft-cognitive qnamaker