在Watson Assistant中有条件地从题外话中返回 [英] Conditionally return from digression in watson assistant

查看:88
本文介绍了在Watson Assistant中有条件地从题外话中返回的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在阅读文档,找不到Watson Assistant的此问题的答案.

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.

有没有办法做到这一点?也许通过手动编辑JSON以某种方式覆盖指令以在某些情况下从题外话返回?

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?

下面是问题的示意图:

对话框流

推荐答案

有一个函数<? clearDialogStack() ?>,当调用该函数时,它将擦除对话框中设置的所有题外话,因此该对话框不会从题外返回.因此,只需在不希望WA返回的节点中调用此函数.

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.

此处在文档中: 查看全文

登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆