How do you get to the original message text in a Microsoft Bot Framework LuisIntent method

后端 未结 4 1636
孤城傲影
孤城傲影 2021-02-14 11:00

I\'m trying to access the complete original text from within a method marked as a LuisIntent within a LuisDialog.

The documentation shows these

4条回答
  •  后悔当初
    2021-02-14 11:10

    You could do it like this by using the Query property of the LuisResult,

    [LuisIntent(intentName: "someIntentName")]
    private async Task Eligibility(IDialogContext context, LuisResult result)
     {
       await context.PostAsync($"The original text is: {result.Query}");
       context.Wait(MessageReceivedAsync);
    }
    

提交回复
热议问题