现在,LUIS的Bot服务模板将创建run.csx
和BasicLuisDialog.csx
。但是他们的结构不允许构建比简单演示更大的任何东西。例如,您必须将一个类中的所有LUIS意图定义为方法。 C#脚本的另一个问题不允许命名空间使其很难用于任何大型命令空间。Azure Bot Service可以使用.NET(而不是C#Script)吗?
所以有办法使用.NET dll,但这会使依赖管理变得非常糟糕。我试图包含项目中实现我自己的IDialog和上述任何逻辑的所有dll。我改变run.csx
用我IDialog实现由#r
加载,但后来我得到错误
mscorlib: Exception while executing function: Functions.messages. mscorlib: Exception has been thrown by the target of an invocation. f-messages__-1289066319: Method not found: 'Microsoft.Bot.Connector.BotAuthenticator Microsoft.Bot.Builder.Azure.BotService.get_Authenticator()'
与project.json依赖(这是由过时的方式为.NET)打我得到的只是另一个错误
mscorlib: Exception while executing function: Functions.messages. f-messages__-213535778: Could not load file or assembly 'Microsoft.Bot.Builder, Version=3.8.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
试图找到任何Bot服务和.NET集成的例子,但没有。
看看[BotBuilder SDK for .NET概述](https://docs.microsoft.com/en-us/bot-framework/dotnet/bot-builder-dotnet-overview) – nilsw