locked
Programatically Invoking LUIS Outside the Message Controler RRS feed

  • Question

  • Hi All,

    I'm writing a bot application that uses a Prompt Dialog to interact with users. The idea here is when a user selects a certain option a message should be sent to LUIS that will be processing the request via ML. Thought about two ways to get it done. 1 - Invoke LUIS directly 2 - Simulate a user entry to make sure the message would pass by the Message Controller and finally the Root Dialog which will be making a LUIS call Makes sense? I've tried something like this but it didn't work.

    public virtual async Task ChoiceReceivedAsync_MainMenuOption(IDialogContext context, IAwaitable<MainMenuOption> activity)
        {
                  ...
                            IMessageActivity message = Activity.CreateMessageActivity();
                            message.Text = "Como e a seguranca da escola?";
                            message.TextFormat = "plain";
                            message.Locale = "en-Us";             
                            var luisAttributes = new LuisModelAttribute(BellaMain.GlobalVariable.LuisModelID, BellaMain.GlobalVariable.LuisSubscriptionKey);
                            var luisService = new LuisService(luisAttributes);
                            await Conversation.SendAsync(message, () => new Dialogs.RootDialog(luisService));
        }

    Suggestions? Ideas?

    Thanks in advance




    Monday, August 20, 2018 10:14 AM

All replies

  • Hi Amintas,

    This forum discusses and asks questions about the C# programming language, since your issue is more related to bot framework, and bot questions can be posted at Stack Overflow using the botframework tag

    https://stackoverflow.com/questions/tagged/botframework

    Best regards,

    Zhanglong 


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, August 21, 2018 5:26 AM