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?
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?
If you have simple one line responses then the following code snippet will work in a response.
<? {
0: "Message 1",
1: "Message 2",
2: "Message 3"
}[new java.util.Random().nextInt(3)]
?>
The 3 in nextIt(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.