|
|
Experienced member
Total posts: 42
Joined: Oct 11, 2017
|
I have several bots on the same server and interrogate each on a different port.
My concern is how to switch from one bot to another without redoing a build of the bot to launch?
Thank you for a help.
|
|
|
|
|
Posted: Mar 5, 2019 |
[ # 1 ]
|
|
Moderator
Total posts: 2372
Joined: Jan 12, 2010
|
there are a couple of techniques for multiple bots. One is to compile them all in the same build, on the same port, with each having a different bot name and possibly a bot id. You can have up to 64 different bots in a build (but only in the same language). If you have a single machine running multiple copies of cs on different ports, you can tell an instance to relocate source and TOPIC folder to different places, so each can build independently
|
|
|
|
|
Posted: Mar 6, 2019 |
[ # 2 ]
|
|
Experienced member
Total posts: 42
Joined: Oct 11, 2017
|
Thank you.
I understand and my case is the last. Is there a start command to start a CS copy with a default bot instead of making a build of the bot so that it appears by default.
|
|
|
|
|
Posted: Mar 6, 2019 |
[ # 3 ]
|
|
Moderator
Total posts: 2372
Joined: Jan 12, 2010
|
If you have a multibot build, you can use bot=xxxx on the run command (or cs_init.txt) to specify what bot to be running.
|
|
|
|
|
Posted: Mar 7, 2019 |
[ # 4 ]
|
|
Experienced member
Total posts: 42
Joined: Oct 11, 2017
|
Yes, I have multibot build but that I run the CS copy on a specific port like ./LinuxChatScript64 port=1099 bot=toto, it does not launch toto by default but for example the last bot compiled on this port. I thought that by launching this command it would prevent me from making a build of toto to make it available on this port.
Where do I find cs_init.txt or do I have to create it?
|
|
|
|
|
Posted: Mar 7, 2019 |
[ # 5 ]
|
|
Moderator
Total posts: 2372
Joined: Jan 12, 2010
|
cs_init.txt is a top level file you create. But it is no different than using bot=xxx on the command line. And that command does not change the default bot. Normally if you want a specific bot from outside, you’d pass that in as part of the 3-string message format. That’s what allows a server to serve lots of people different bots with the same server and port.
You already are selecting a port somehow. Can’t you name the bot within?
In a pinch, I could add a parameter that allows you to change the default bot on startup.
|
|
|
|
|
Posted: Mar 21, 2019 |
[ # 6 ]
|
|
Experienced member
Total posts: 42
Joined: Oct 11, 2017
|
Sorry for my late response.
Indeed it would be very interesting to be able to change the default bot on startup unlike the build to do to activate a bot.
ALso, How can I name the bot while I choose the port?
|
|
|
|
|
Posted: Mar 21, 2019 |
[ # 7 ]
|
|
Moderator
Total posts: 2372
Joined: Jan 12, 2010
|
1) you could have a batch file that edits a cs_init file to add a defaultbot= on startup or pass that in as a parameter to the cs command line for launch.
|
|
|
|
|
Posted: Mar 21, 2019 |
[ # 8 ]
|
|
Experienced member
Total posts: 42
Joined: Oct 11, 2017
|
The default option on the command line does not set the specified bot. You have to go through :build bot
to have the wanted bot.
In which folder should I put the cs_init file?
I am under windows
|
|
|
|
|
Posted: Mar 21, 2019 |
[ # 9 ]
|
|
Moderator
Total posts: 2372
Joined: Jan 12, 2010
|
the file is top level of CS, but if param doesnt work it wont help. I will have to debug param
|
|
|
|
|
Posted: Mar 21, 2019 |
[ # 10 ]
|
|
Experienced member
Total posts: 42
Joined: Oct 11, 2017
|
ok, Maybe I have to open an issue for reminder.
|
|
|
|
|
Posted: May 4, 2019 |
[ # 11 ]
|
|
Senior member
Total posts: 103
Joined: Oct 17, 2017
|
Bruce,
Frejus states that he always gets the “last bot built”. Could that be because his filesXXXX.txt only picks up a single bot definition? This is how all of the samples like Harry work. You have a filesXXX.txt file for each individual bot.
According to: ChatScript Multiple Bots manual
if you want them to cohabit you must have a single filesxxx.txt file that names the separate bot’s folders- they must be built together
If he wants to have Dorothy and Toto, then he should have a filesOZ1.txt file that picks up /RAWDATA/Dorothy/botdef.top and /RAWDATA/Toto/botdef.top. He would then
:build OZ1
If he does this then both bot definitions would be in the build and the bot=toto thing would work.
If this is correct then you would not have to add any new parameters to the engine.
Stephen G.
|
|
|
|
|
Posted: May 4, 2019 |
[ # 12 ]
|
|
Moderator
Total posts: 2372
Joined: Jan 12, 2010
|
|
|
|
|
|
Posted: May 6, 2019 |
[ # 13 ]
|
|
Senior member
Total posts: 103
Joined: Oct 17, 2017
|
Bruce,
On a related note. What is the use case for having multiple bots in the same engine instance? Is it possible to have bot A send a message to bot B and have bot B respond back? If yes, how?
As I understand it the purpose of multiple bots is to allow each one to specialize in a type/area of conversation. Bot A could handle initial customer greeting and figuring out what area of information the customer wants [returns: bot-B, order-status: bot-C, find-a-product: bot-D], once it does that, it could pass the conversation of to the other bot. Is this thinking correct? Are there other use-cases for multiple bots?
Stephen G.
|
|
|
|
|
Posted: May 6, 2019 |
[ # 14 ]
|
|
Moderator
Total posts: 2372
Joined: Jan 12, 2010
|
The enterprise use case is for A-B testing or experimental bot testing or as you mentioned, different areas of conversation. Typically we have 7-10 ongoing a-b tests where I work that are around for a few weeks before deciding to kill them or merge them into the std bot. There is no obvious way to have separated bots send each other messages, except by a call to an intermediary program via something like popen or system, but I dont have a real use for that.
|
|
|
|