Search code examples
aiml

Can I get some examples with this issue?


I'm seeming to have a little trouble with the <srai> tag. Can I have some other examples of to use it better please?


Solution

  • First of all, you need to create your main category. In this case, the bot will respond to "I know"

    <category>
        <pattern>I KNOW</pattern>
        <template>Great. Glad you understand it.</template>
    </category> 
    

    Now you can create other ways of saying "I know", like "ik" or "I kno" and use <srai> to activate your main category

    <category>
        <pattern>IK</pattern>
        <template><srai>I know</srai></template>
    </category>
    
    <category>
        <pattern>I KNO</pattern>
        <template><srai>I know</srai></template>
    </category>
    

    This will allow the following conversation:

    Human: ik
    Bot: Great. Glad you understand it.