如何使用Bot Framework在单个漫游器上实现多个LUIS对话框? [英] How do I implement multiple LUIS dialogs on a single bot using the Bot Framework?

查看:63
本文介绍了如何使用Bot Framework在单个漫游器上实现多个LUIS对话框?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于每个LUIS模型仅限于20个意图和10个实体,并且每个模型都必须具有定义明确的范围/域,所以我想知道在单个bot应用程序中实现多个对话框的最佳方法是什么我的机器人可以覆盖多个域,例如,获取财务信息和天气信息.

Since each LUIS model is limited to 20 intents and 10 entities, and also each model must have a well defined scope/domain, I'm wondering what's the best way to implement multiple dialogs in a single bot application, if I want my bot to be able to cover multiple domains, let's say for example get financial information and weather information.

我知道理想情况下我将拥有两个不同的机器人,但是在这种情况下,我需要使用一个机器人来完成此任务.我阅读了Dialogs(和其他几个部分)和LUIS帮助页面上的Bot Framework文档,但找不到任何有关如何实现该目标的信息.我还看了看这些示例,却一无所获,有没有办法做到这一点?

I know that ideally I would have two different bots, but in this situation I need to do this with a single bot. I read the Bot Framework documentation on Dialogs (and several other parts) and the LUIS help page, but I wasn't able to find any information on how I could achieve that. I also gave a look at the examples and found nothing, is there a way to do this?

推荐答案

因此,从技术角度来看,这没有任何重大问题.您只需注册两个LUIS应用程序,并在您的应用程序中有两个对话框,其中包含您创建的特定应用程序的LUIS键.

So, from the technical standpoint there isn't any major issue with that. You just register two LUIS apps and have two dialogs in your app with the LUIS keys of the specific app you created.

我想您的问题更多是如何将消息重定向到相应的LUIS机器人".这是一个有效的问题.

I guess your question is going more to "how do I redirect the message to the corresponding LUIS bot". And it's valid question.

AzureBot 的情况与此类似,他们使用是用于虚拟机操作的一个). 在这里,您可以在其RootDialog中看到他们还具有LUIS,以及他们如何以无/空意图将消息重定向到相应的对话框.

The AzureBot has a similar scenario and they resolved it using a DialogFactory that follows an strategy pattern. Each 'domain' dialog knows if the incoming message is something they can handle or not (this is the one for Virtual Machine operations). Here you can see how in their RootDialog they also have LUIS and how in the None/Empty intent they are redirecting the message to the corresponding dialog.

在这个领域中可以探索的另一种替代方法是使用IScorable接口,长话短说,基本上可以让您拦截所有消息并决定要做什么. ContosoFlowers 样本的IScorable 实现,以便您采取看着. C#BotBuilder库还具有 DeleteProfileScorable ,基本上可以处理/deleteprofile消息.

Another alternative to explore in this space, is using a IScorable interface, which, long story short, will basically allow you to intercept all the messages and decide what to do. The ContosoFlowers sample has a IScorable implementation for you to take a look at. The C# BotBuilder library has also the DeleteProfileScorable, that basically handle the /deleteprofile message.

这篇关于如何使用Bot Framework在单个漫游器上实现多个LUIS对话框?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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