Hi Dear all,
I have some difficulty detecting repeating input sentences. Ex, Assume some users say same thing again and again to see how bot responds.
User : Test
Bot : Some response from random pool
User : Test
Bot : Some other response from random pool
..
I would like if the bot can do following,
User : Test
Bot : Some response from random pool
User : Test
Bot : Why are you saying the same thing?
...
I have searched in the forum but couldn’t find a direct method do achieve this functionality. So I came up with a solution, at least if AIML is checking in * pattern (for unknown input), we have a condition to check for last user input. The user input is kept in a variable using <set> tag. Here is the concept,
<category><pattern>*</pattern>
<template>
<condition name="userlast">
<li value="<star/>">Why are you saying the same thing?l</li>
<li>Something from a random pool</li>
</condition>
<think><set name="userlast"><star></star></set></think>
</template>
</category>
The problem is with the value=”<star/>” part as obviously it is invalid. So my question is, how can I check for the user pattern within the conditional value? Or is there any other way to fulfil the requirement I have?
Thanks folks!