LUIS/QnA maker 有没有办法忽略来自选择提示的用户答案?

Is there a way for LUIS/QnA maker to ignore user's answer when it came from a choice prompt?

LUIS/QNA 不断触发与选择提示中的选择相关的意图。

我的问题是 LUIS/QNA 有没有办法忽略来自选择提示的用户输入?或者选择提示答案不会显示为用户输入,所以 LUIS/QNA 将保留选择?

例如在这个选择提示中。这不会到达 SecondStepAsync,因为 LUIS/QNA 会将用户的选择检测为类似于选择标签的意图并执行其他操作。

    private static async Task<DialogTurnResult> FirstStepAsync(WaterfallStepContext stepContext, CancellationToken cancellationToken = default(CancellationToken))
    {
        choices.Add(new Choice { Value = "Choose Red"});
        choices.Add(new Choice { Value = "Choose Green"}});

        return await stepContext.PromptAsync(
            ChoicePromptId,
            new PromptOptions
            {
                Prompt = MessageFactory.Text($"Welcome to FAQ! Choose the number of the question or type your own question."),
                Choices = choices,
            });
    }

    private static async Task<DialogTurnResult> SecondStepAsync(WaterfallStepContext stepContext, CancellationToken cancellationToken = default(CancellationToken))
    {
        var choiceResult = (stepContext.Result as FoundChoice).Value.ToLower();

        switch (choiceResult)
        {
            case "choose red":
                await stepContext.Context.SendActivityAsync(MessageFactory.Text($"..."));
                break;

            case "choose green":
                await stepContext.Context.SendActivityAsync(MessageFactory.Text($"..."));
                break;

            default:
                break;
        }

        return await stepContext.NextAsync();
    }

LUIS 是一个独立的服务,它只接受一个输入,即一个话语,并返回一个输出,即意图。

现在,如果您希望 LUIS 忽略选择提示语句,那么您将在 OnTurnAsync 方法本身中构建它。

你可以看看here in this tutorial。根据用户给出的响应,您将使用适当的服务。这就是您的 onTurnAsync 伪代码的样子

OnTurnAsync()

Record the utterance
Check what was the active dialog. <Documentation [here][2]>
IF (!choice Dialog)
  call LUIS
else
  /*
    your code here.
  */