LUIS Action and Parameters in Bot Framework Form Flow
Hello,
LUIS have action and parameters, what i understood we can use them to create a LUIS bot by providing LUIS url in our bot registration at bot connector. I have few questions
- How to implement business logic in LUIS
- How to integrate with any external system
- How to render cards, carousel and other rich features from LUIS
Does bot builder provide a out of the box way to use LUIS action and parameters in Form Flow?
Basic idea is to understand how to use all features of LUIS while developing a bot. For now i am using only intents and entities not actions, parameters and prompts.
Thanks, Dhiraj
We recently added support for LUIS actions to LuisDialog: https://github.com/Microsoft/BotBuilder/commit/5158523a3d144ad6e58b13eec44da6416780d0d7#diff-44121b8e461aef56ce26671729a0a3faR270
I don't think they will integrate with FormFlow, though.
Thanks Will Portnoy, Is there any sample or example to see how to use it?
Here is a sample Luis model that defines an action: https://github.com/Microsoft/BotBuilder/blob/develop/CSharp/Samples/PizzaBot/Model/PizzaBot.json#L60
and here is the sample code showing how to extract the parameter for the triggered action in the LuisResult: https://github.com/Microsoft/BotBuilder/blob/develop/CSharp/Samples/PizzaBot/PizzaOrderDialog.cs#L94
Thanks Shahin for your response!!
This is a custom implementation, even we are not using parameter and prompt from actionParameters while action is null and asking for day, what if there are several parameters and those are still need to be collected from user, do we need to write custom code for all of them? Or is there any better way to implement them so that already existing prompts in actionParameters can be used (For sure we can use them in custom implementation)? I know i am demanding here, i am just looking for best way to use LUIS actions.
Thanks, Dhiraj
In current implementation, LuisActionDialog stays on top of the stack and relay the prompts generated by Luis service for different parameters to the user until Luis service returns with Dialog.Finished status. This implies that all the parameters for the action are collected and the action is triggered. Then the LuisResult which has the triggered action plus the parameters collected will be dispatched to the intent handler of the LuisDialog.
This is great, i just checked in Pizza bot its hitting method after prompt!! Luis action prompts happening first then conversation redirecting to dialog. I didn't find actions in samples before as i checked it in already downloaded samples :( Thanks for your support!! :)