加入机器人自由开放源码项目 BotLibre.org
Self, AIML, and scripting : [AIML] How to use random?

RE: [AIML] How to use random?

通过 admin 发布 Apr 29 2017, 16:28

In AIML a random tag gives one of the elements at random.

<category> <pattern>How are you?</pattern> <template> <random> <li>I'm okay.</li> <li>I am great!</li> <li>Not so good.</li> <random> </template> </category>

Bot Libre also lets you add multiple responses to a question and chooses one automatically.

How are you?
I'm okay.
I am great!
Not so good.

Self also has a random() function.

How are you?
Template("{random ("I'm okay.", "I am great!", "Not so good.")}")


Id: 16867344
发布: Apr 29 2017, 16:28
更新: Apr 29 2017, 16:31
答复: 0
的风景: 2032, 今天: 3, 周: 8, 一个月: 9
0 0 0.0/5