问题
How do we get user type input in Bot Framework V4? in V3 i used the below
PromptDialog.Text(context, UserResponse, "Your Name Please?");
Once user enters the name , userResponse will get called. I am not able to find somthing like this in V4 , only waterflowdialog i am finding , Since i am using lots of PromptDialog.Text in my project it is not feasible to create dialogs for all text
Any Tips would be much appreciated.
回答1:
You don't need to add waterfall dialogs all over the place just to use prompts. The example referenced in the comments above shows how you can use them in conjunction, but you can add prompts to a dialog set without waterfalls.
Then later, you can reference them like this:
The example show above is from the Botbuilder-Samples repo, specifically the 'Simple Prompts' C# sample. There are other samples that include prompts, such as multi-turn prompt, prompt validation and even cafe bot (if you look at the 'book table' intent)
来源:https://stackoverflow.com/questions/55029213/c-sharp-bot-framework-v4-get-userinput