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代碼來傳遞輸入? –