How to handle Luis intent with parameters with prompt

巧了我就是萌 提交于 2019-11-29 17:04:45

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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!