IBM Watson助手:如何在新动作技巧中获得随机回应
In the Watson Dialog there is an option to generate multiple responses randomly. Allowing it to feel less robotic.
In the new Actions skills they do not have this option. Is there a way to reproduce it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
更新:
spel不再支持响应。因此,下面的示例代码仅在分配给变量时才起作用,然后在响应中使用该变量。
动作现在具有创建多个响应的能力。
如果您有简单的一行响应,则以下代码段将在响应中起作用。
3
在NextInt(3)中
必须是随机响应的总数。如果您有更详细的响应,则可以分配上下文变量
java.util.random()。nextint(3)
(再次将3更改为总响应)。然后将其用作步骤中的条件。Updates:
SpEL is no longer supported in responses. So the sample code below will only work if assigned to a variable, then that variable is used in the response.
Actions now has the ability to create multiple responses.
If you have simple one line responses then the following code snippet will work in a response.
The
3
innextInt(3)
must be the total number of random responses.If you have more detailed responses to give then you can assign a context variable a value of
java.util.Random().nextInt(3)
(again changing 3 to total responses). Then use that as a conditional in the steps.