【发布时间】:2019-07-24 16:42:10
【问题描述】:
Bot 框架示例 - NLP 调度 你好, 我正在使用 NLP 调度,其中我有多个 Luis 和 QnA 模型同时运行。我已经为 Luis 映射了得分最高的意图,并创建了一个对话类,我也想在这些意图映射块中实现它。如果阻止,我如何在 Intent 中初始化我的对话框?
我尝试过使用Dotnet core 2.1版本和dispatch的最新版本
对话框代码 -
private async Task<DialogTurnResult> LeaveDateRangeStepAsync(WaterfallStepContext stepContext, CancellationToken cancellationToken)
{
var leaveApply = (LeaveApplication)stepContext.Options;
if (leaveApply.TravelDate == null){
return await stepContext.PromptAsync(nameof(TextPrompt), new PromptOptions { Prompt = MessageFactory.Text("Please Provide me with your Leaves Tenure") }, cancellationToken);
}
else{
return await stepContext.NextAsync(leaveApply.TravelDate, cancellationToken);
}
}
意图块
if (topIntent == "LeavesDateTenure"){
// here I want my dialog to work
}
【问题讨论】:
标签: c# dialog botframework azure-language-understanding qnamaker