简体   繁体   English

IBM Watson Assistant:如何通过禁用输入字段来关闭对话框?

[英]IBM Watson Assistant: How to close dialog by disabling input field?

How can I disable the input field of Watson assistant after giving closing statement?给出结束语句后如何禁用 Watson 助手的输入字段?

Ex: If the bot shows thank you for using our services, then the Input field should be grayed out and should not let user to type, user has to restart the bot to chat.例如:如果机器人显示感谢您使用我们的服务,那么输入字段应该是灰色的并且不应该让用户输入,用户必须重新启动机器人才能聊天。

There is a method in watson:instance.updateAssistantInputFieldVisibility(false) it disables the input field, so you can customize the way you want to use. watson:instance.updateAssistantInputFieldVisibility(false) 中有一个方法会禁用输入字段,因此您可以自定义您想要使用的方式。

I see the following options for you to "disable" the chat in Watson Assistant.我看到以下选项可让您在 Watson Assistant 中“禁用”聊天。

  • You could respond with a pause .你可以用暂停来回应
  • Set an internal variable that from your point of view the dialog is done and should not be resumed again.设置一个内部变量,从您的角度来看,对话已完成,不应再次恢复。 React to any input by not answering.通过不回答来对任何输入做出反应。
  • Consider a special version of anything_else .考虑any_else的特殊版本。
  • Build your own interface that can disable the input.构建您自己的可以禁用输入的界面。

IMHO disabling input should not be done, it is against best practices.恕我直言,不应该禁用输入,这违反了最佳实践。 You want the user to interact.您希望用户进行交互。 Reloading the web page with the chat typically reenables input anyway.使用聊天重新加载 web 页面通常会重新启用输入。 So what is the use case...?那么用例是什么……?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM