AI Zone Admin Forum Add your forum

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

Bot flag error in Linux

We have a bot, code from control:
outputmacro: testbot()
$control_pre = ~control
$control_main = ~control
$control_post = ~control
$userprompt = ^”$login: >”
$botprompt = ^“testbot: “

In topic file:
topic: ~TESTTOPIC bot=testbot (helloworld)
u: (helloworld) I’m child.

So, in Windows we call function PerformChat(“testuser”, “testbot”, “helloworld”, “”, output). And it returns “I’m child”. It works correctly.
We do the same in Linux and output is “I don’t know what to say”. Error.

Thanks for any advise.


  [ # 1 ]

I note that your outputmacro contains “login” that is not making any sense.  If I remove that….

it works for me with version 1.27 on both windows and linux 32 bit.


  [ # 2 ]

Thanks! It really works without any modifications in 1.27. In 1.26 only rule flag was working.


  [ # 3 ]

According to user manual:
“But maybe you don’t want some choices. You can put an existence test of a variable at the start of a choice to restrict it.
  ?: (hi)  [$ready How are you feeling?][Why are you here?] “
Is it right to use smth like this:
?: (hi)  [$bot=harry How are you feeling?][Why are you here?]


  [ # 4 ]

?: (hi)  [$bot=harry How are you feeling?][Why are you here?]

is not currently legal.  Partly it’s a speed issue for default behavior, partly because I don’t use single equal as comparison on the output side (it is assignment) and if I support $bot=harry then I would have to support $bot!=harry and $item?~set and others. which is why its a speed issue.

But you can achieve the same effect like this:

?: (hi) if ($bot == harry){$$matched = true}
[$matched How are you feeling?][Why are you here?]

though if you do this often, you may need to clear the variable afterwards e.g.,

    $$matched = nil   # (or null if you prefer)


  [ # 5 ]

Great thanks!


  login or register to react