jeudi 6 décembre 2018

AIML, recognizing a saved variable in a pattern

Hey I am just learning AIML, and I want to give my chat bot a word, which it then saves and will recognize when I say it back later

Here is how I am trying to do it:

   <?xml version = "1.0" encoding = "UTF-8"?>
   <aiml>
       <category>
         <pattern> secret word is *</pattern>
         <template>
           <set name = "secretWord"><star/></set>? Ok got it.
         </template>
       </category>

       <category>
       <pattern> <get name = "secretWord"/> </pattern>
       <template>Thats the secret word</template>
       </category>
   </aiml>

as of now it just doesn't respond once I say the secret word

perhaps there is a better/more standard way to do this? Or is this impossible in aiml?

Aucun commentaire:

Enregistrer un commentaire