如何获得 PromptDialog.Choice 功能并仍然允许 Bot Framework 中的其他用户响应?

How to get PromptDialog.Choice features and still allow other User responses in Bot Framework?

Bot Framework 中的 PromptDialog.Choice 提供了许多运行良好的内置功能。但是,我希望能够拦截/覆盖匹配过程。

获得 PromptDialog.Choice 功能并且能够接受某些可能不匹配的字符串的最佳方法是什么?

示例:

机器人:还有什么我可以帮你的吗?

然后允许用户输入绕过上述选项的命令或数字,而不会触发重试错误消息。

我可以考虑两种选择:

  1. 创建您自己的 PromptChoice 对话框并覆盖 TryParse 逻辑以处理那些可能不匹配的字符串。 Here 是 'CancelablePromptChoice' 的一个示例,它基本上可以识别一些允许用户退出 PromptChoice 而无需选择任何选项的取消条款。
  2. 使用Facebook's quick replies but the drawback is that you will have to write some of the logic that is already in place in the PromptChoice. Here是我几周前写的Microsoft Bot Framework使用Facebook快速回复的例子