简体   繁体   English

如何在 Botbuilder v4 框架中使用 Luis Intent 而无需从 LUIS 下载 json 文件

[英]How to use Luis Intent in Botbuilder v4 framework without downloading the json file from LUIS

I am using the below code:我正在使用以下代码:

https://github.com/microsoft/BotBuilder-Samples/tree/master/experimental/adaptive-dialog/csharp_do.netcore/ https://github.com/microsoft/BotBuilder-Samples/tree/master/experimental/adaptive-dialog/csharp_do.netcore/

I have loaded csharp_do.netcore.sln in visual studio file and able to see core-bot todo-bot,using-cards and multi-turn-prompt.我已经在 visual studio 文件中加载了 csharp_do.netcore.sln,并且能够看到 core-bot todo-bot、using-cards 和 multi-turn-prompt。 I am able to build the project.我能够构建项目。 It is mentioned in README that I have to download the json file from LUIS and put in specific location.However, even after downloading the file and putting in the location, intents are not getting recognized.自述文件中提到我必须从 LUIS 下载 json 文件并将其放入特定位置。但是,即使下载文件并放入该位置后,意图也无法识别。

Please help me with adding a LUIS intent in this project.请帮助我在此项目中添加 LUIS 意图。

And also where to do the necessary changes to identify the intents provided in chat bot.以及在哪里进行必要的更改以识别聊天机器人中提供的意图。 Will it be in RootDialog.cs?它会在 RootDialog.cs 中吗? I have also put the LUIS app id and key and hostname in CoreBot.luis.json.我还将 LUIS 应用程序 ID、密钥和主机名放入 CoreBot.luis.json。

In the attached screenshot,sample output can be seen.在随附的屏幕截图中,可以看到样本 output。 Where it is only producing the output from CoreBot.luis.json file and its kind of a static output, even though after changing the json file content i am getting the same response in chatbot and i also want it to detect the output directly from LUIS portal它仅从 CoreBot.luis.json 文件及其类型 static output 生成 output,即使在更改 json 文件内容后我在聊天机器人中得到相同的响应,我也希望它直接从 806334LUIS8 检测 8086334LUIS8门户网站

我已经在 LUIS 中训练并发布了意图。

Please help.请帮忙。

Ok, your issue here is sheer confusion.好的,你的问题是纯粹的混乱。 You list 3 separate projects that you're saying aren't working.你列出了 3 个你说不起作用的独立项目。

Both the CoreBot and the ToDoBot require LUIS. CoreBot 和 ToDoBot 都需要 LUIS。 You have to add the LUIS model on your LUIS.ai portal using either the CLI or manually through the portal upload:您必须使用 CLI 或通过门户上传手动在 LUIS.ai 门户上添加 LUIS model:

如何添加路易斯

Once you have your LUIS app created, you can use the appID and Password you get from the LUIS portal to add to the appsettings.json file:创建 LUIS 应用程序后,您可以使用从 LUIS 门户获取的 appID 和密码添加到 appsettings.json 文件:

门户密钥

应用设置.json

In the question, you say you're using CoreBot, in the first comment, you say you're using Cards Bot, and in a later comment you say you're using ToDo Bot.在问题中,你说你在使用 CoreBot,在第一条评论中,你说你在使用 Cards Bot,在后面的评论中你说你在使用 ToDo Bot。 Those are three different bots in the solution, so you're probably putting your keys in the wrong appsetttings.json file.这些是解决方案中的三个不同的机器人,因此您可能将密钥放在错误的 appsetttings.json 文件中。 Double check that you're using the right appsettings.json file.仔细检查您是否使用了正确的 appsettings.json 文件。

Also to note: the bots in the experimental branch are meant to see different possible approaches that the Bot Framework might take going forward, and should not be used in production environments.另请注意:实验分支中的机器人旨在查看 Bot Framework 可能采用的不同可能方法,不应在生产环境中使用。 They are not guaranteed to work, and are not supported.他们不能保证工作,并且不受支持。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM