Conditionally return from digression in watson assistant

白昼怎懂夜的黑 提交于 2019-12-11 13:25:12

问题


I have been reading through the documentation and cannot find the answer to this question for Watson Assistant.

I have a digression that I only sometimes want to return back to the previous place in the dialog.

Specifically, after the user enters the digression, if the user responds "Yes" then I do not want the digression to return back, but if the user responds "No" then I do want the digression to return to the previous place.

Is there a way to do this? Perhaps by manually editing the JSON to somehow override the directive to return from the digression in some cases?

Below is a diagram of the issue:

Dialog Flow


回答1:


There is a function <? clearDialogStack() ?> that when called it will erase all the digressions that are set in dialog and hence the dialog will not return from digression. So just call this function in a node where you don't want WA to return.

Here it is in the doc: https://cloud.ibm.com/docs/services/assistant?topic=assistant-dialog-runtime#dialog-runtime-digressions




回答2:


If I understand you correctly, you could create two different nodes for handling the user response of "yes" or "no" based on the way digressions are setup today. If yes, the node needs to be configured to not return back (don't click the checkbox). If no, click the checkbox.



来源:https://stackoverflow.com/questions/50609370/conditionally-return-from-digression-in-watson-assistant

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!