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

Here’s a working client in PERL to the ChatScript Server
 
 

I was having trouble getting this much to work due to some subtle (to me) issues that I finally figured out.

So, here’s a working program in Perl that connects to my ChatScript server and lets me send and receive volleys from it.

Enjoy!

Comments welcome. It works for me, so far, today, against an Ubuntu 12.04 server, running ChatScript 2.03.

( My earlier efforts,  documented and (mis)posted in “New to Chatbot Programming” (or some such) had two issues.  One was that I wasn’t stripping trailing line-feeds off input, which I fixed.

The bigger one was that I was soliciting user input WHILE the socket was open, so the server was timing out before I’d even sent it my input.  I finally moved everything else out of the small section that opens the socket, sends the message, gets the reply, and shuts the socket, and now I don’t get messages like “Sorry, what were you saying?” )

Wade

File Attachments
perlchat.pl  (File Size: 3KB - Downloads: 0)
 

 
  [ # 1 ]

Hi Wade,
  Thanks for posting it, but I get a blank page when I click on that link. I am interested in taking a look, because I want to write a client in C++.

 

 
  [ # 2 ]

Actually, chatscript SHIPS with a client in c++ in csocket.cpp

 

 
  [ # 3 ]

Thanks Bruce. I will take a look at it.

 

 
  [ # 4 ]

For the Perl users, here’s an actually readable version you can download of the socket client code skeleton in Perl, that works for me.

File Attachments
perlchat.txt  (File Size: 3KB - Downloads: 115)
 

 
  [ # 5 ]

Bruce,  thank you for providing the csocket.cpp chatscript client in C++ !

I didn’t find a forum here specifically for discussion of, a FAQ, a manual-section, and working examples of clients for ChatScript and interfacing from various other worlds, e.g. PHP.  Maybe we should start one?

I love ChatScript smile  but I wasn’t going to put hundreds of hours into it until I was sure I knew how to get to it from my world of interest right now—Second Life,  OpenSim, and Unity3d/Jibe.

Thank you!

Wade

 

 
  login or register to react