简体   繁体   中英

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?

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.

I see the following options for you to "disable" the chat in 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 .
  • 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. So what is the use case...?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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