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

Avoid repeating generated text
 
 

t: query(direct_v ? opinion ?)
  @1 = ^pick(@0fact)
  I think ^pick(@1subject) ^pick(@1object)

Is it possible for the above to not repeat its text within the last 50 volleys but to keep trying the facts until it can generate an unrepeated value?

 

 
  [ # 1 ]

yes.  But there is a bug in the engine (now fixed for next release) which would prevent the obvious mechanism from working. ^print() doesn’t return a failure when the data is declined due to repeat. When it does, this code would work:
query(direct_v ? bb ?)
loop()
{
_0 = first(@0subject)
if (print( _0 likes )) {end(rule)}
}
If print successes, the loop end. If print fails, it tries the next element.

 

 
  [ # 2 ]

In the interim, you can do this
_0 = first(..)
print(_0 likes)
if (%response != 0){end(rule)}

 

 
  login or register to react