Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
557 views
in Technique[技术] by (71.8m points)

botframework - Handling multiple dialogs in Microsoft bot framework

I am creating a bot using Microsoft bot framework , the bot will be receiving orders for a restaurant , I want to know how can I handle multiple dialogs , like for example the customer makes the first order , then i want the bot to ask do you want something else? then the customer says yes/no , incase of yes to repeat the same dailog again with keeping the state of the first one , what I am seeing in the documentation now is only one conversation and one dialog.

Thanks a lot

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

To manage multiple dialogs you need to use the Dialog Chains. You can either manage the stack of dialogs explicitly (using Call/Done) or implicitly using the Chain fluent methods. Here is sample of how to use it.

If the set of things that the user can select are already predefined I would then recommend using FormFlow. The Pizza & Sandwich samples are good examples of how to handle orders with a predefined set of options.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

57.0k users

...