Im trying to integrate Luis with botframework. From what i see (p/s. still new on this), Luis handle the response based on the text input of the user. So when im trying to use Adaptive Card Submit Button action, i can set the value but not the text value. Even if i use dataJson on submit button, it still produce null error. Im still confuse on how to approach this. Code is as follows:
LuisIntent("Greet.Welcome")]
public async Task QueryGPN(IDialogContext context, IAwaitable<IMessageActivity> activity, LuisResult luisResult)
{
AdaptiveCard gpnCard = new AdaptiveCard();
gpnCard.Body.Add(new TextBlock()
{
Text = "GPN Lookup Form",
Size = TextSize.Large,
Weight = TextWeight.Bolder
});
TextInput gpnInput = new TextInput()
{
Id = "GPN",
IsMultiline = false
};
gpnCard.Body.Add(gpnInput);
gpnCard.Actions.Add(new SubmitAction()
{
Title = "Submit"
});
Attachment gpnCardAttachment = new Attachment()
{
ContentType = AdaptiveCard.ContentType,
Content = gpnCard
};
IMessageActivity gpnFormMessage = context.MakeMessage();
gpnFormMessage.Attachments = new List<Attachment>();
gpnFormMessage.Attachments.Add(gpnCardAttachment);
await context.PostAsync(gpnFormMessage);
context.Wait(this.MessageReceived);
}
[LuisIntent("Curse")]
public async Task Cursing(IDialogContext context, IAwaitable<IMessageActivity> activity, LuisResult luisResult)
{
Console.WriteLine("Curse");
await context.PostAsync($"Curse");
context.Wait(this.MessageReceived);
}
The situation is i will input curse on the text input and im expecting the bot will redirect to the "Curse" LuisIntent.
TQVM in advanced.