SRAI 到带通配符的模式?
SRAI to a pattern with wildcard?
嗨,我是 AIML 的新手,基本上,我想将“WHAT IS A”的答案重复用于类似的模式,例如“告诉我一个”,我试过按照下面的方式做,但它似乎没有用。也很抱歉,如果标题没有真正描述这一点,我不确定该起什么标题。
<category>
<pattern> WHAT IS A * </pattern>
<template>
<think><set name = "state"><star /></set></think>
<condition name = "state">
<li value = "cat fact">Cats purr? idk</li>
<li value = "dog fact">Woof woof </li>
</condition>
</template>
</category>
<category>
<pattern> TELL ME A * </pattern>
<template>
<think><set name = "state"><star /></set></think>
<condition name = "state">
<li value = "cat fact"><srai>WHAT IS A CAT FACT</srai></li>
<li value = "dog fact"><srai>WHAT IS A DOG FACT</srai></li>
</condition>
</template>
</category>
您需要像下面这样使用 标签:
<category>
<pattern>TELL ME A *</pattern>
<template>
<srai>WHAT IS A <star/></srai>
</template>
</category>
使用此方法,您还可以处理疯狂的输入,例如:
<category>
<pattern>WOULD YOU BE SO KIND AS TO SHARE WITH ME A * THAT YOU KNOW</pattern>
<template>
<srai>WHAT IS A <star/></srai>
</template>
</category>
嗨,我是 AIML 的新手,基本上,我想将“WHAT IS A”的答案重复用于类似的模式,例如“告诉我一个”,我试过按照下面的方式做,但它似乎没有用。也很抱歉,如果标题没有真正描述这一点,我不确定该起什么标题。
<category>
<pattern> WHAT IS A * </pattern>
<template>
<think><set name = "state"><star /></set></think>
<condition name = "state">
<li value = "cat fact">Cats purr? idk</li>
<li value = "dog fact">Woof woof </li>
</condition>
</template>
</category>
<category>
<pattern> TELL ME A * </pattern>
<template>
<think><set name = "state"><star /></set></think>
<condition name = "state">
<li value = "cat fact"><srai>WHAT IS A CAT FACT</srai></li>
<li value = "dog fact"><srai>WHAT IS A DOG FACT</srai></li>
</condition>
</template>
</category>
您需要像下面这样使用
<category>
<pattern>TELL ME A *</pattern>
<template>
<srai>WHAT IS A <star/></srai>
</template>
</category>
使用此方法,您还可以处理疯狂的输入,例如:
<category>
<pattern>WOULD YOU BE SO KIND AS TO SHARE WITH ME A * THAT YOU KNOW</pattern>
<template>
<srai>WHAT IS A <star/></srai>
</template>
</category>