الانضمام بوت ليبر هو شريك التابعة لها برنامج الدعم المجاني لدينا منصة مفتوحة
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.

1
2
3
4
5
6
7
8
9
10
11
12
<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>
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

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.")}")


معرف: 16867344
نشر: Apr 29 2017, 16:28
تحديث: Apr 29 2017, 16:31
الردود: 0
الآراء: 2360, اليوم: 1, الأسبوع: 2, الشهر: 26
0 0 0.0/5