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

Questions on the script
 
 

How can I use $control_pre topic to initialize variables before putting proposals to $control_main topic. I do not have to initialize variables. Can you give me an example please!

How can I send a proposal (user input) in the specific topic (excluding other topic) and Is it possible to disable in this topic default processing user input (use a completely original user input in rules).

Please help me!

 

 
  [ # 1 ]

in the bot definition topic where harry has
$control_main = ~control
add
$control_pre = ~precontrol   (or whatever you want to name your topic).

An example precontrol topic is
topic: ~precontrol system []
t:  $$starttopic = %topic
    $$startvalue = 0
etc.  These will all execute once before the first volley is processed.

I’m not sure I understand your second question.  Your control script (HARRY) currently calls rejoinders, responders from various areas driven by current topic or keyword and gambits in the same way. If you want to ONLY go to a specific topic, you would replace that logic with
if (%response == 0) {nofail(TOPIC respond(~yourtopic))}
if (%response == 0) {nofail(TOPIC gambit(~yourtopic))}
or its equivalent. For example you could have the last responder in ~yourtopic do the thing that calls a gambit instead, like this:
u: () keep() gambit(~)
then you wouldn’t need the control script call to the gambit.

As for how to pass input thru unchanged, if you know in advance you want to do this ALL THE TIME, you just set $token = 0 in your bot definition.  If you discover you want to do this on the fly (as I do when I know or realize the user is going to provide his user name), you can set the $token to 0, do a RETRY(SENTENCE) to force the current processing to fail, it will retry using the new token value, and when you get to your pre-control script you can reset it back to default.

 

 
  [ # 2 ]

If I set variable $token = 0 user input is processing (im -> I and etc….)

 

 
  [ # 3 ]

If you have changed $token = 0 in your bot definition,
do a :restart (or rerun the program from scratch) with a new user (so you don’t inherit any data in your existing users files).
That should work (I did it and typed in “I’m loving it” and it didn’t break apart I’m.  If it fails for you, email your USERS/log-* file to me and I’ll see what it says.

 

 
  [ # 4 ]

thank you

 

 
  login or register to react