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..

Get rejoinder before end of the rule
 
 

Hi,

when a rule is finished %outputrejoinder is set.

I want to get the value before the rule is finished.

Right now I use

^next(REJOINDER ~) 

While this works fine inside top level rules, it is unreliable for the use inside of rejoinders.

This is because the next rejoinder of a rejoinder is sometimes on the same level.
I want this value to be null if there is no rejoinder on the next level.

How do I do this?

 

 

 
  [ # 1 ]

you want to know what the rejoinder WILL BE before it is set. You can use your next(rejoinder) trick, you just have to sort out whether or not the next is a rejoinder of current rule or not. You can use ^getrule given tags for both rules, getting the rule kind and seeing if the rejoinder is deeper or not.

 

 
  [ # 2 ]
Bruce Wilcox - Mar 16, 2017:

getting the rule kind and seeing if the rejoinder is deeper or not.

Is there a way to do this without the update installed where strings are compareable in if?
I have to use an old version of chatscript for now..

 

 
  [ # 3 ]

one way (not thinking hard), is to create 2 ordered concept sets, lettered a-q in first and lettered b-r in second. Then look up rule type in first getting index and using index get letter in second, and see if ==

 

 
  login or register to react