I'm using recursion in AIML using the <srai>
tag, like the following code:
<category><pattern>I LIKE *</pattern>
<think><set name="name"><star/></set>
<set name="it">
<set name="topic"><star/>
</set>
</set>
</think>
<template><srai>I DIG</srai></template>
</category>
<category><pattern>I DIG</pattern>
<template>
<random>
<li>If you dig <get name="name"/>, plant something in it</li>
<li>I dig <get name="name"/> too.</li>
<li>If you dig <get name="name"/> deep enough, rabbits will live in it.</li>
</random>
</template>
</category>
A few days ago, this code was working, but now it works as values have not been set. I'm getting:
If you dig unknown, plant something in it.
I dig unknown too.
If you dig unknown deep enough, rabbits will live in it.
what am I doing wrong?
Your AIML is incorrect format. You can place
<think>
,<set>
tags under template. So your AIML will be as follows