在Microsoft Bot框架中处理多个对话框

编程入门 行业动态 更新时间:2024-10-26 14:28:05
本文介绍了在Microsoft Bot框架中处理多个对话框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在使用Microsoft bot框架创建一个bot,该bot会收到一家餐馆的订单,我想知道如何处理多个对话框,例如客户首先下订单,然后让bot问您还想要其他东西吗?然后客户说是/否,如果是,则在保持第一个状态的情况下再次重复相同的日志,我现在在文档中看到的只是一个对话和一个对话框.

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.

非常感谢

推荐答案

要管理多个对话框,您需要使用对话框链.您可以显式管理对话框堆栈(使用Call/Done )或隐式使用Chain fluent方法. 此处是如何使用它的示例.

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.

如果用户可以选择的一组东西已经预定义,那么我建议使用 FormFlow . Pizza & Sandwich 示例是如何处理具有预定义订单的很好的示例选项集.

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.

更多推荐

在Microsoft Bot框架中处理多个对话框

本文发布于:2023-11-17 06:26:35,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1609150.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:多个   对话框   框架   Microsoft   Bot

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!