问题
I have implemented the None Intent as follows..
[LuisIntent("None")]
public async Task None(IDialogContext context, LuisResult result)
{
await context.PostAsync("I'm sorry. I didn't understand you.");
context.Wait(MessageReceived);
}
But looks like i need to train some utterance at luis side, which i don't want. I am looking something whichever is not found or recognize at luis, should fire the None Intent handler. How do I achieve this ?
回答1:
Add also the following line to your None
method:
[LuisIntent("")]
If Luis cannot recognize an intent, will return an empty string and so your BOT will be able to handle it.
The None
intent is still useful though; imagine an scenario where LUIS recognize an intent but that recognition for some reason is wrong? In that case, you will want to set that utterance as None
and then retrain.
来源:https://stackoverflow.com/questions/41392366/how-to-use-luis-none-intent-in-c-sharp-without-train-utterance-at-luis