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

Chat with your Chatscript Chatbot around the house with your iPad
 
 

Contratulations Bruce on the Loebner 2014 win!  Now undoubtedly more people will be interested in trying out Chatscript. 

I recommend reading ALL of the Chatscript documentation multiple times while experimenting with creating a chatbot.  I am always discovering something new.  However, life is short, and there may be someone else out there with a windows 8 computer and an iPad so I will share my experience setting up the web server for use with my iPad.

I have always experimented with Chatscript chatbots using the black and white console application which is started by clicking on the chatscript.exe in the main Chatscript folder.  I recently discovered the web interface folder and how I can run the Chatscript “server” on my laptop while using my iPad as the “client”.

To quickly get a Chatscript chatbot to show on my iPad at home I did the following:
I have a laptop running Windows 8.  I have an internet connection with a wireless router that I use for both my laptop and my iPad.

I enabled IIS and installed PHP following the simple steps in this article:
http://support.microsoft.com/kb/2819022

The link explains and includes screenshots on how to enable IIS 8 and install Microsoft Web Platform Installer which then allows you to install php.

I then right clicked on the folder c:\inetpub\wwwroot and chose properties and then the security tab and granted full access to users of my laptop.  (Not a good idea for a webserver but I am not going to open my firewall to the outside world.)

I copied …\Chatscript 4.8.1 B\WEBINTERFACE\BETTER\index.php and …\Chatscript 4.8.1 B\WEBINTERFACE\BETTER\ui.php to c:\inetpub\wwwroot\.

I edited the index.php file and changed the name of the bot from Rose to Harry:
var botName = ‘Harry’;

I edited the ui.php and updated the following lines (I did not change the port #).  You should enter your ip address and bot name:

//  =============  user values ====
$host = “111.111.111.111”;  //  <<<<<<<<<<<<<<<<< YOUR CHATSCRIPT SERVER IP ADDRESS OR HOST-NAME GOES HERE
$port = 1024;      // <<<<<<< your port number if different from 1024
$bot = “Harry”;    // <<<<<<< desired botname, or “” for default bot
//=========================

(To get your ip address you can right-click the lower left corner of the screen and select “command prompt” from the shortcut menu.  At the cmd prompt type “ipconfig” and press enter.  See the IPv4 address for your internal IP address.)

Navigate to …\Chatscript 4.8.1 B\SERVER BATCH FILES and start the chatscript server by double clicking the file “localserver.bat”.

On your iPad in the browser type http://<youripaddress>/index.php and you should see the web client displayed and you should now be able to chat with your bot around the house.  In my case I did not have to modify any ports on my windows firewall or in my virus protection software.  I am not exposing the server to the outside world. 

If you know html and php you can edit the index.php file to change the look of the web page.  I have added an avatar image.

For those wanting to know more about the Chatscript clients and server Bruce has provided more information with the documentation that ships with Chatscript in the folder:
…\Chatscript 4.8.1 B\DOCUMENTATION\CLIENTS AND SERVERS

 

 

 
  [ # 1 ]

Thanks for this guide.

I have implemented client code in Python and also deployed a bot to a free hosting account on pythonanywhere.com
So, if there is interest I can elaborate on the subject, I bet some developers would need some free online enviroment to test and publish their bot.

 

 
  login or register to react