Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
827 views
in Technique[技术] by (71.8m points)

c# - How to handle Luis intent with parameters with prompt

I have an intent in LUIS with several required parameters. I also set prompt for these parameters so that when they are not detected, LUIS asks for them. However in the BOT, I always get them as null when they are not specified.

The bot is not asking for the lacking parameters (even if the Prompts are set in Luis). Why? Is there a way to get the prompts automatically? Or is that still not supported in MS Bot Framework? I'm using C#

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Based on your comment it seems you are using an older version of the Nuget package. Make sure to update to the latest BotBuilder version. Current version is v3.5.

In the latest versions, the BotFramework team added support for LUIS v2 API and added some brand new capabilitites. I'm pretty sure that V2 is now the default in the latest versions, but even that, the LuisModel attribute now accepts the API version besides the ModelId and the ModelSubscriptionKey

For example, now the LuisDialog will act if your intent requires parameters and those are not provided. In that scenario (which it seems is yours), the LuisDialog will automatically launch a LuisActionDialog and ask the user for the missing parameter, using the Prompt message you defined in the action parameter on the LUIS frontend.

BTW, to check for the action, you can to navigate through the actual intent. The IntentRecommendation has an Actions collection property.

The image below shows the full tree, including Action Parameters.

Action parameters


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...