Multi-Line (separate lines) output in AIML?

1.5k Views Asked by At

I want the user to ask a question, and then the chat bot responds in different lines but in order.

2

There are 2 best solutions below

0
On

Depending on the interpreter, you may be able to use the line break tags that HTML uses.

 <br/>

They can be used like this:

<category>
    <pattern>WHO INVENTED LINUX</pattern>
    <template>
        Linus Torvalds, along with many open source developers, and the Free Software Foundation, GNU invented Linux.<br/>
        Linus Torvalds invented Linux in 1991.
        <think>
            <set name="topic">computers</set>
        </think>
    </template>
</category>
0
On

For newer AIML versions, considering the age and still relevance of this question,
is still valid, and the use of could be combined with it in the templates. However, be careful that these responses (utterances) will include the break-tags and other things, making context with painful to debug.