AI Zone Admin Forum Add your forum

NEWS: Chatbots.org survey on 3000 US and UK consumers shows it is time for chatbot integration in customer service!read more..

Using LI output in THAT tag (Is it possible?) 
 
 

Can I use like input of THAT tag a output coming of LI tag? For example:

<category>
  <
pattern>WHAT IS YOUR NAME?</pattern>
  <
template>My name is <get name="name"/> 
  <
condition name="user">     
    <
li value="unknown">how about your name</li
    </
condition>
    </
template>
 </
category>


 <
category>
  <
pattern>IS ^</pattern>
  <
that>HOW ABOUT YOUR NAME</that>
  <
template>Nice to meet you <star/></template>
 </
category

It doesn’t works

 

 
  [ # 1 ]

This is because you have no punctuation in your first template.

The output will be “My name is (user’s name) how about your name”
This doesn’t match the <that> of “how about your name” and so the 2nd category will never be called.

You will either need a full stop after My name is <get name=“name”> or change your <that> to “MY NAME IS * HOW ABOUT YOUR NAME”

You should also remove the question mark from your first pattern and I would put a full stop at the end of your second template. Also the bot will reply with the user’s name as you have used <get name=“name”> instead of <bot name=“name”>. Finally, once the user tells the bot his/her name, your second category will not store it.

I’ve taken the liberty of rewriting your categories.

<category>
  <
pattern>WHAT IS YOUR NAME</pattern>
  <
template>My name is <bot name="name"/>. 
  <
condition name="user">     
    <
li value="unknown">How about your name?</li
    </
condition>
    </
template>
 </
category>


 <
category>
  <
pattern>IS ^</pattern>
  <
that>HOW ABOUT YOUR NAME</that>
  <
template>Nice to meet you <set name="user"><star/></set>.</template>
 </
category
 

 
  [ # 2 ]

Great Steve Worswick “small details” but very importants.

 

 
  [ # 3 ]

Indeed. If you need any further help, please post I will be more than happy to help you.

 

 
  login or register to react