I am trying to create a bot using LUIS, but it is much more complicated than I thought. So far, I have managed to create my LUIS application and create Intent and Entity , and I have created several expressions that seem to work fine.
Then I created my bot and connected it to Louis. When I test my bot, it works as expected. Now, for the fun part. I want to handle the parameters. On Luis, I added an action for my intention :

As you can see, I added an invitation. My code in my bot currently looks like this:
/// <summary> /// Tries to find the category /// </summary> /// <param name="result">The Luis result</param> /// <param name="alarm"></param> /// <returns></returns> public string TryFindCategory(LuisResult result) { // Variable for the title EntityRecommendation title; // If we find our enenty, return it if (result.TryFindEntity(PiiiCK.Category, out title)) return title.Entity; // Default fallback return null; } [LuisIntent("Choose category")] public async Task ChooseCategory(IDialogContext context, LuisResult result) { // Get our category var category = TryFindCategory(result); var response = "The category you have chosen is not in the system just yet."; switch (category) { case "camera": response = $"You need help buying a { category }, is this correct?"; this.started = true; break; default: if (!string.IsNullOrEmpty(category)) response = $"Sorry, PiiiCK does not deal with { category.Pluralise() } just yet."; break; } // Post our response back to the user await context.PostAsync(response); // Execute the message recieved delegate context.Wait(MessageReceived); }
I think you can guess where I'm going. If the user types Help me buy a camera , he will receive the value Select category and the correct Entity will be selected. But if they type Help me buy , it still comes up with the right intention, but it will not have a dedicated Entity . I want my bot to see this and use the text in Prompt , which I created in LUIS, and when the user selects his object , I want him to return to LUIS with this parameter.
I donโt know how to do this, and I canโt find any tutorials on this. Any help would be appreciated (even links!)
source share