2017-06-20 40 views
2

现在,LUIS的Bot服务模板将创建run.csxBasicLuisDialog.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集成的例子,但没有。

+0

看看[BotBuilder SDK for .NET概述](https://docs.microsoft.com/en-us/bot-framework/dotnet/bot-builder-dotnet-overview) – nilsw

回答

0

你可以尝试在VS中使用botbuilder而不是bot服务。有一个VS的模板,可以找到here

+1

Bot用Bot写的Builder与Azure Bot Service不兼容。所以这不是一个答案。 – Rambalac

+0

您可以将其部署为Azure中的应用服务,而不是bot服务。但是如果你愿意的话,你也可以在bot服务中写你的bot在Node.js中。 – JasonSowers

+0

这与问题无关。应用程序服务要贵得多,特别是如果每​​天只使用多次机器人。 Bot服务仅支持每个消息处理。 – Rambalac

相关问题