How to change LUIS model dynamically
Hi
How would it be possible to update the LUIS Model in LuisDialog dynamically? There is LuisModel attribute but I can't see where I could change this model dynamically, if user change the language. Thanks!
[LuisModel("xxxxxx-xxxxx-xxxxx-xxxx-xxxxxxxxxxxxxxxxx", "xxxxxxxxxxxxxxxxxxxxxxxx")]
[Serializable]
public class WelcomeDialog : LuisDialog<WelcomeScreen>{
}
The LuisDialog constructor takes an ILuisService:
https://github.com/Microsoft/BotBuilder/blob/master/CSharp/Library/Dialogs/LuisDialog.cs#L146
You can implement ILuisService to select which underlying LuisService/LuisModelAttribute you'd like to use based on your language signal.
@willportnoy Thanks for the answer. Do you know if that also applies to the Node.js version of the SDK?
@Stevenic @muzahmed can you comment?
@willportnoy @palmerabollo The Node.JS IntentDialog constructor takes a list of IIntentRecognizer's. The recognizer's are passed a context which includes dialogData and the message object. One approach would be to implement your own IIntentRecognizer which just shims your language-specific LUIS models based on, for example, a language flag in dialogData or on the message.
Thanks @willportnoy , so I will have 2 seperate dialogs with different language LUIS Service.