1
我试图让我的机器人根据答案提出问题并回复。这个问题是随机的,以“你好吗?”结尾。在AIML中使用<that>并加* *
<aiml version = "1.0.1" encoding = "UTF-8">
<category>
<pattern>HI</pattern>
<template>
<random>
<li>Hi! How are you?</li>
<li>Hello there. How are you?</li>
<li>Greeings. And how are you?</li>
</random>
</template>
</category>
<category>
<pattern>GOOD</pattern>
<that>* how are you?</that>
<template>Happy to hear that.</template>
</category>
<category>
<pattern>*</pattern>
<template>Can you rephrase that?</template>
</category>
</aiml>
如果我回复'好',机器人将不会理解并回复'您能改述吗?'。
你使用这个AIML文件与python代码来传递输入? –