botframework-sdk icon indicating copy to clipboard operation
botframework-sdk copied to clipboard

How To Use Multiple Luis Models in a same program.I am using C#. Please provide a sample code if anyone have .

Open Masssluis opened this issue 10 years ago • 3 comments

@msft-shahins , @msftgits @b4usat @willportnoy @evnik please help

Masssluis avatar Oct 19 '16 05:10 Masssluis

Can you share your code that you've tried so far? Are you using the BotBuilder SDK or the Connector SDK?

jameslew avatar Oct 19 '16 20:10 jameslew

@Masssluis you can simply use multiple LuisModel attributes on your class, or pass multiple ILuisService instances to your LuisDialog constructor, as in this unit test: https://github.com/Microsoft/BotBuilder/blob/master/CSharp/Tests/Microsoft.Bot.Builder.Tests/LuisTests.cs#L243

Beware of the caveats: https://docs.botframework.com/en-us/technical-faq/#how-can-i-use-more-than-one-luis-model

willportnoy avatar Oct 19 '16 20:10 willportnoy

Thanks a lot @willportnoy for your help. The code is working now. I had not updated the bot builder sdk and was using the older version.As soon as i updated the code was working.

Masssluis avatar Oct 21 '16 11:10 Masssluis