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

Beginner Questions & Feature Requests
 
 
  [ # 16 ]

first, :bot name works fine for me.

second,  an alternate way to change bot is :restart and then at the login name your name and bot you want (except that’s broken until next update)

Third there’s more to changing a bot over than just calling your function and setting $bot.  Which is why :bot exists at all.
Internally the system has a login process to change over to the correct files to use for the bot, which merely executing your code doesnt do.

Meanwhile :bot xxx works fine for me. So we need to find out why it doesnt work for you.  Once it DOES work, the
code you want for changing the bot by “conversation” instead of as a :command is the following example:

u: (become Sarah) ^command(:bot sarah)

except that currently ALL uses of :commands test for authorization, which you would have disallowed if you were running a server for lots of people. I have changed the code to NOT require authorization of the command is being executed from script. and fixed a bug. Future release.

 

 
  [ # 17 ]

Ah okay, i thought these macros like ^sarah() are made for changing the bot when a client ist restricted to use the :bot command. Thank you for the upcoming updates!

topic: ~CMD_CHANGE_BOT system repeat ()
tSARAH () ^command(:bot sarah) ^reuse(CHANGE)
tDANIEL () ^command(:bot daniel) ^reuse(CHANGE)
tCHANGE () Heywas kann ich für dich tun?
tNOCHANGE () Du sprichst doch schon mit mir!

topic: ~CHANGE_BOT system (Bot Daniel Sarah reden sprechen unterhalten quatschen)
# TODO: Kann ich Sarah sprechen?
#! Ich würde mich gerne mit Daniel unterhalten
#! Wir wollen uns gerne mit Sarah absprechen.
#! Wir würden gerne mal kurz mit Daniel über etwas reden. 
s: ([ich wir] [will wollen möchte möchten würde] {mit} Sarah [reden sprechen unterhalten quatschen] $bot!=Sarah) ^reuse(~CMD_CHANGE_BOT.SARAH
s: ([ich wir] [will wollen möchte möchten würde] {mit} Daniel [reden sprechen unterhalten quatschen] $bot!=Daniel) ^reuse(~CMD_CHANGE_BOT.DANIEL)
s: ([ich wir] [will wollen möchte möchten würde] {mit} Sarah [reden sprechen unterhalten quatschen] $bot=Sarah) ^reuse(~CMD_CHANGE_BOT.NOCHANGE
s: ([ich wir] [will wollen möchte möchten würde] {mit} Daniel [reden sprechen unterhalten quatschen] $bot=Daniel) ^reuse(~CMD_CHANGE_BOT.NOCHANGE


After cleaning everything and build it again the :bot command works now!

But there is some unusual behaviour:
DANIEL: Welcome to ChatScript.
hendrik: > :bot daniel
DANIEL: Have you been here before?
hendrik: > :bot daniel
DANIEL: hi
hendrik: > :bot sarah
SARAH: Welcome to ChatScript.
  >:bot sarah
SARAH: Glad you came back.
  >:bot daniel
DANIEL: Glad you came back.
hendrik: > :bot sarah
SARAH: Hi, again.
hendrik: >


As you can see, first time i call “:bot sarah” my prompt-text changes. Next time i switch to daniel (and also when i change to sarah again afterwards) it works fine.

Also with the given code above i get following reactions:

DANIEL: Welcome to ChatScript.
hendrik: > ich möchte sarah sprechen
Unknown command
DANIEL: Hey, was kann ich fzr dich tun?
hendrik: >

 


Another question:

Is it possible to include files1.txt in files0.txt?!
I thought it could be nice to build a hierarchy. Something like that:
:build all
  :build 0
  :build daniel
      :build daniel_commands
      :build daniel_informations
      :build daniel_smalltalk
  :build sarah
...

 

 

 
  [ # 18 ]

I didn’t understand what was “unusual behavior”.

For builds, you do not have to have a files1 or a files0 at all, ever. You could put a list of everything into files0 or files1.
You can also create files with arbitrary combinations. The last letter of the file name determines whether it builds level 0 or level 1. If the last character is 0, it builds level 0, otherwise it builds a level 1.

My builds are:
:build 0 —common code
:build angela - level 1 angela only
:build harry - level 1 harry only
:build all - level 1 all bots

or one could do
:build all0 - all code for every bot and all common code

or one could do
:build all - all code for every bot and all common code.

It’s all in what you list inside the file and what level its built at

 

 
  [ # 19 ]

as for what went wrong with: ich möchte sarah sprechen

I dont have all your files, so I cant replicated it easily myself.
What you want to do is just before you type in that input, do
:trace all
then do your input and then you can peruse the log file or email it to me.

bruce

 

 
  [ # 20 ]

Okay from your builds:
You can make :build all, so you have filesall.txt. How does that file looks like, have you listed every top-file of angela and harry in that file or have you just told him in some way to build all top-files which are list in fileangela.txt and fileharry.txt?


Forget the unusual behaviour, i found the fault. One line of code got lost… (shame on me)
But the bot command still doesnt work.

Code is still the same like in my previous post.

in USERS/topic_hendrik_anonymous.txt at 0: ^anonymous
Cannot find bot anonymous
   in USERS
/topic_hendrik_anonymous.txt at 0: ^anonymous
input
:0 Thu Jul 12 03:39:20 2012 Cannot find bot anonymous
 caller
:hendrik callee:anonymous in sentence:  
Cannot find bot anonymous
input
:0 Thu Jul 12 03:39:48 2012 Cannot find bot anonymous
 caller
:hendrik callee:anonymous in sentence:  
Cannot find bot anonymous
   in USERS
/topic_hendrik_anonymous.txt at 0: ^anonymous
input
:0 Thu Jul 12 03:40:42 2012 Cannot find bot anonymous
 caller
:hendrik callee:anonymous in sentence:  
Cannot find bot anonymous
   in USERS
/topic_hendrik_sarah .txt at 0: ^sarah 
input
:0 Thu Jul 12 03:41:07 2012 Cannot find bot sarah 
 caller
:hendrik callee:sarah  in sentenceich mzchte sarah sprechen 
Cannot find bot sarah 
   in USERS
/topic_hendrik_sarah .txt at 0
input:0 Thu Jul 12 03:41:08 2012 No response generated -   ich mzchte sarah sprechen caller:hendrik callee:sarah  in sentence:  
No response generated -   ich mzchte sarah sprechen 


The anonymous messages are just because of the clean build…
In that example is visible that he try to make a space behind sarah. I already tried some movement in the code like swaping the functions command and reuse, using \n… In every case something doesn’t work wink

 

 
  [ # 21 ]

I am now a bit confused.  :bot works, :bot doesnt work.  You’ve said both now.

 

 
  [ # 22 ]

Okay sorry for my bad descriptions. When i enter :bot command on my own in chatscript.exe it works fine. But using ^command(:bot sarah) in my rules doesn’t work correctly.

 

 
  [ # 23 ]

Right. Got it. That’s because a bug in chatscript (fixed in my copy) leaves a trailing space passing the argument into :bot from the command system. That means the bot name to :bot is seeing “sarah ”  and not “sarah”.  I’ll try to upload a new version this weekend.

 

 
  [ # 24 ]

Puh im happy to hear that this was not a further bug of mine, a bit less shame for me XD

 

 < 1 2
2 of 2
 
  login or register to react