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

^addtopic and ^pendingtopics
 
 

Isn’t calling ^addtopic(~foo) supposed to put ~foo onto the pending topics stack?

This code does not seem to alter the pending topics stack.

uGET_VAR_1 (!$var1
^
log(\n this is the pending stack: ^command( :pending) )
^
addtopic( ~foo-getInfo)
^
log(\n this is the resulting stack: ^command( :pending) )
^
respond(~foo-getInfo

the initial stack looks like: ~foo ~introduction
the second stack looks like: ~foo ~introduction

Now, my topic: ~foo-getInfo is configured as a system topic. But the doc says that ^addtopic is supposed to cure that.

Finally, the compiler says that the function ^pendingtopics() requires a parameter… so I couldn’t use it in the code.

Stephen G.

 

 
  [ # 1 ]

it seems that a closer reading of the documentation indicates that any topic marked as ‘system’ will never get added to the pending topics list. My solution is to make the topic:

topicmy_topic keep repeat (3kdhfiehglsee

that way it will never match a keyword topic but can be added to pending.

As for the ^pendingtopics(), the required parameter seems to be a factset id

## compile error
@= ^pendingtopics()

## compiles just fine
^pendingtopics(@3

BTW, I just grepped in the src folder for pendingtopics and found it in topicsystem.cpp
Yea!!! opensource grin


Stephen G.

 

 
  login or register to react