I currently have a chatbot running in visual studio using Microsoft's bot framework in the language c#. I integrated LUIS into the bot and I'm wondering how can I make it so that a FormFlow similar to this example appears on a specific intent.
So far this is the code for my Form:
internal static IDialog<InfoGroup> MakeRootDialog()
{
return Chain.From(() => FormDialog.FromForm(InfoGroup.BuildForm));
}
public enum GroupOptions
{
A, B, C, D, E, F, G, H
};
[Serializable]
public class InfoGroup
{
public GroupOptions? groupId;
public static IForm<InfoGroup> BuildForm()
{
return new FormBuilder<InfoGroup>()
.Message("Please select an option")
.Build();
}
};
And I'm trying to send it form my LUIS intent method like so:
[LuisIntent("SpecificGroup")]
public async Task SpecificGroupIntent(IDialogContext context, IAwaitable<IMessageActivity> activity, LuisResult result)
{
await context.PostAsync(FormDialog.FromForm(InfoGroup.BuildForm));
context.Wait(MessageReceived);
return;
}
This is obviously not the correct way to call the form, how can I make it so that a form appears as a response called directly from my SpecificGroupIntent() method? Any help will be greatly appreciated. After the form is filled I want to use the option that the user selected to display text accordingly.