如何使用带提示的参数处理Luis Intent [英] How to handle Luis intent with parameters with prompt

查看:56
本文介绍了如何使用带提示的参数处理Luis Intent的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我打算在LUIS中使用几个必需的参数.我还为这些参数设置了提示,以便在未检测到它们时,LUIS会要求它们.但是在BOT中,当未指定它们时,我总是将它们设置为null.

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.

该机器人不会询问缺少的参数(即使在Luis中设置了Prompts).为什么?有没有一种方法可以自动获取提示? 还是MS Bot Framework仍不支持该功能? 我正在使用C#

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#

推荐答案

根据您的评论,您似乎正在使用Nuget软件包的旧版本.确保更新到最新的BotBuilder版本.当前版本为 v3.5 .

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.

在最新版本中,BotFramework团队添加了对LUIS v2 API的支持,并添加了一些全新的功能.我非常确定V2现在是最新版本中的默认版本,但即使如此,

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

例如,现在,如果您的意图需要参数而未提供参数,则LuisDialog将起作用.在这种情况下(看来是您的情况),LuisDialog将

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.

顺便说一句,要检查操作,可以浏览实际意图. IntentRecommendation 具有

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.

这篇关于如何使用带提示的参数处理Luis Intent的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆