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

Best strategy for Chatscript Upgrades?  Example, RFC.
 
 

I tried to follow the advice in the manuals but it is a bit vague and confusing to me.  I finally got something working and just wanted to share for other people and get suggestions for improvement, etc.

Following the instructions I got a directory hierarchy like this:

Some_Directory/
    
files1.txt
    MyBots
/
         
Alice/
            
alicecontrol.top
            someother
.top
         Joe
/
            
joecontrol.top
            barista
.top

         All
/
            
politics.top
    ChatScript
/
    
local.sh
    server
.sh 

note: ChatScript directory holds the contents of the latest chatscript.  to upgrade just delete the chatsript directory and plop the new one in it’s place, or do a git pull, or unzip the new file on top, or however else you want to overwrite the contents of the old chatscript version with the new.

files1.txt

../MyBots/Alice/
../
MyBots/Joe/
../
MyBots/All/
RAWDATA/QUIBBLE

local.sh:

#!/bin/sh 
cd ChatScript && BINARIES/MacChatScript livedata=../LIVEDATA english=LIVEDATA/ENGLISH system=LIVEDATA/SYSTEM local 

server.sh:

#!/bin/sh 
cd ChatScript && BINARIES/MacChatScript livedata=../LIVEDATA english=LIVEDATA/ENGLISH system=LIVEDATA/SYSTEM 

This seems to be working fine.  I’m guessing that the livedata parameter sets the directory to look for .top files as well and that is how it all works?  Example is for Mac, edit to suit your circumstances.

 

 
  [ # 1 ]

there is now a TOPIC= parameter to tell where to find the topic folder.

 

 
  [ # 2 ]

please note that topic= and config= work a little differently than buildfiles=

in 9.31
buildfiles= works relative to the BINARIES directory
topic= and config= seem to work relative to the top level ChatScript directory

if you have a directory layout like:

ChatscriptEngine = %CHAT_HOME%
--
LisaBot
----topic1.top
----topic2.top
--Charliebot
-----topic1.top
-----topic2.top
--buildMyBots0.txt
--buildMyBots1.txt
--MYBOTS_COMPILED_TOPIC
--cs_init_production.txt
--cs_init_development.txt
--chatScript.NLP
----BINARIES
----{the rest of chatscript from github} 

If you are doing everything with a windows batch file you would use

start "chatscript both" /%CHAT_HOME%\ChatScriptNLP\BINARIES ChatScript.exe defaultbot=lisa buildfiles=..\.. topic=..\MYBOTS_COMPILED_TOPIC 


if you want to use the config file mechanism then your command from BINARIES would be:

ChatScriptNLP\BINARIES>ChatScript.exe config=..\cs_init_development.txt 

and the cs_init_development.txt would look like:

defaultbot=lisa
buildfiles
=..\..
topic=..\COMPILED_BOTS_TOPIC
Serverctrlz 

 

 

 

 
  [ # 3 ]

Bruce, you may have a different take on what I am about to write. I would be interested to hear it as I am currently developing and documenting our DevOps processes for using ChatScript.

Summary:
I believe that you want to put everything you write related to ChatScript outside of the ChatScript local repsitory directory.  The purpose is to ensure that Git does not detect any changes to the ChatScript repository on your machine.

ChatScript’s .gitignore already ignores lots of things like log files and user logs so that is not a problem. It does not ignore the changes to the root directory (where you put buildxxx.txt files),  TOPIC, LIVEDATA,  RAWDATA, or SERVERBATCHFILES. So if you make any changes inside those directories, Git will keep telling you that the repository is changed and when you upgrade your chatscript version those things could (and probably will) get clobbered if you are not careful.

Having your bot code, buildxxx.txt, cs_init.txt, and windows batch files outside of the ChatScript local directory makes it easy to put all of those things under source control.

Having the TOPIC file outside of ChatScript also makes deploying from the development environment to QA or production server easier. The developer is responsible for doing the :build of the bots. The developer can run any tests and the compiled bots are then put into source control without alteration. The masters of the servers only have to do a Pull from BitBucket and we absolutely know what they are getting; plus they don’t have to know anything about how to build chatbot code.

We have a Git repository that contains the structure you see above. The ChatScript github repository is added as a Git submodule of the top level project. This makes it easy to install the whole smack on new machines. To get it all on a new machine, you just do git clone—recursive http:\bbs\chatproject.git chatproject[\code] and you get the code and chatscript. To update ChatScript we can just change the .gitmodules to point to the latest tag and do git submodule sync[\code]

 

 
  login or register to react