Bot c#: How to restart the conversation with the last input from user
In my Bot I use prompt.text and in the ResumeAfter method I want to check if user said yes, no or something else, and if it's not yes or no to call again my Root dialog(which is Luis class) with the input from the user. Here is the code:
PromptDialog.Text(context, ResumeAfterAsync, $"Was this helpful?");
private async Task ResumeAfterAsync(IDialogContext context, IAwaitable
You might consider using IDialogStack.Forward to forward the message on to the LUIS dialog as a new child (instead of the existing root): https://docs.botframework.com/en-us/technical-faq/#what-is-idialogstack-forward-in-the-c-builder-sdk
But what are you going to do if the user said "yes" or "no"? You have to go somewhere next: https://docs.botframework.com/en-us/technical-faq/#ensure-all-dialog-methods-end-with-a-plan-to-handle-the-next-message
and would that place be the initial root LUIS dialog?
If user said "yes" or "no", I'm calling different methods, It's working well. I've changed the else statment with this: context.Forward(new MainDialog(),ResumeCopleted,msg,System.Threading.CancellationToken.None); MainDialog is my LuisDIalog And now in ResumeCopleted what should I do?? I've tried private Task ResumeCopleted(IDialogContext context, IAwaitable
The IAwaitable
Ok, thanks It's working now
Hi msBot1111 Could you please share code snippet how did u pass the user input back to Luis dialog. Even I want map user prompt to one of the entity in the luis and set it to a variable.
how to achieve the same in v4