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

PostgreSQL ANSI or Unicode?
 
 
  [ # 16 ]

Hi Bruce, I have read “ChatScript ClientServer Manual”
and I tried to follow all what you posted in this thread, but I get confused by this part of the manual…
“CS as an embedded Client
Building a web-based interface to ChatScript is different from building an app involving
ChatScript. In the web-based version, the ChatScript engine will always be a server on a
reasonably powerful machine and have available the full resources of the web.
In building an app-based NLP application with ChatScript, there are two general
architectures, client-based and server-based.”

I would like to comunicate with CS in a single computer by different clients (users), I mean the same PC be the server and the different clients.
From what I have read in your comments above I need to click on LocalServer.bat to run CS as server and then click on LocalClient.bat to run as client, but how exactly I switch between different clients message?

I know the ChatScript Protocol, the message the client sends is a concatenation of three null-terminated text strings.
The first string is the user login name.
The second is the name of the chatbot to talk to.
The third string is the message.

But where do I need to put that message?

Im using a macrorecorder software that allow me to Open FTP Connections, or Invoke commands to FTP Server.
Can I use that to comunicate with CS?? again how I can send the different clients message to the CS server in same PC?

Thanks Advanced. Ill keep reading n trying.

 

 
  [ # 17 ]

The batch files LocalServer and LocalClient are explicitly for testing that a server is working. They are not intended for normal use.  LocalServer merely runs CS on your machine, does not enable ports if they are blocked etc.  Localclient tries to talk only to a local server on the same machine. 

If you want a central CS server and a bunch of clients, is there some reason you are not using a web-based browser to talk to the system? Embedding CS into an app generally means that CS is local with the app and is dedicated to the app. So there is but a single client. Like a mobile device that you can chat with locally without going on the internet because CS is compiled into the app itself.

If, instead, you want an app which is to talk across the internet to a single CS server, then you write code to create a tcp socket and send the message format you described to it. Each person having the app would be able to talk with CS simultaneously.

 

 
  [ # 18 ]

Hi Bruce, thanks for reply
oh then seems I misundertood, please give me your advice.
Here is my case…
I get several Skype contacts chating with me (via Skype) in the same PC, and I would like CS to respond them.
What would be the most appropriate way to do this task?
PD: Im using a macrorecorder to automate windows tasks, and in a near future I would like to add more PCs that also receive differente contact’s skype messages, how can I send those messages to a single CS server?
Thanks Advanced.

 

 
  [ # 19 ]

Hi Bruce
I have tried to do this as you explained…
“Typically for web-based applications, a web-page has a form, the user puts their message into it and press send, and the webpage has code to create a TCP socket, send the message, get back the response, and post the response on the page. CS comes with a sample web-page that does this.”
how can I launch that sampe web-page in order to run CS as server?

also “ChatScript ClientServer Manual” it says that… To run CS as server under Windows you must give it a command line parameter specifying a port. default port 1024. Does it mean send it via command prompt? how and when? Sorry If I didn’t get it Im kinda novice in this windowos network stuff.

Thanks Advanced.

 

 
  [ # 20 ]

To run a windows version of the server, you would normally make it a service task (run automatically). But for a simple example, you just stand in the chatscript directory and type:

ChatScript port=1024

That will launch the server version of CS.  It would be up to you make sure port 1024 was open to the outer world and not blocked by some firewall of yours.  That would give you a server of CS, but not a webpage server to allow browsers to come to it. The whole how to set up windows to serve web pages is beyond my immediate knowledge. Normally I advise people to get a free AWS account (for a year) and use a Linux box, in which case you merely edit the sample webpages I supply to put in your machines ip address, and copy it to /var/www/html directory as root, having done all the other things listed in the AWS server guide manual. If you are trying to use windows as a webserver, you have to read about how to do that elsewhere as I’ve never tried it.

 

 
  [ # 21 ]

As for wanting skype people to talk to your bot instead of you, the first thing that comes to mind is you have to write a skype client (not a trivial undertaking) so that it could take the indiviual channels and send them to CS and have CS send back data to send to Skype users. I have no clue how to do that.

 

 
  [ # 22 ]

Hi bruce, thanks for reply
yes I read the “ChatScript Amazon Server” which talks about renting an Amazon AWS account and all steps that follow that, but Im wondering Bruce, Is it really necessary in my case?? Since I just need to run CS in server mode in a local network. What I want to do is sent all these Skype different user messages (each one with its username and message) to the CS server, Can I do that without building a webpage?? How can I do it? Im using a macro recorder that allow me to gather the Skype usernames and their messages and stores them in variables, but I just don’t know how to pass them to CS server, also this macrorecorder can run FTP server actions, like invoke command on FTP servers, does it have anything to do with CS server?

Thanks Advanced.

 

 
  [ # 23 ]

I forgot to say, I would like to know how to pass(send) the skype username and messages to skype and how to receive the answer so I can send it back to Skype. With the macrorecorder Im currently use I can properly copy and paste messages from Skype, also it has an action called “Invoke FTP Command” that has these options: ACTION INPUT: FTP Connection, FTP Command, Valid Reply Code(s); ACTION OUTPUT: Store Reply Code into, Store Reply Text into. Can I use it to communicate with chatscritp?
Thanks Advanced.

 

 
  [ # 24 ]

Without writing some programming Glue or being human glue that passes messages back and forth between skype and CS, I have no idea how you would accomplish your task,

 

 
  [ # 25 ]

Thanks Bruce for your reply

I guess that according to what you said…
“you just stand in the chatscript directory and type:
ChatScript port=1024
That will launch the server version of CS.”

So from that moment on, I just type a concatenation of three null-terminated text strings (username::chatbotname::message ‘\0’) Can I type this null-termianted string manually in the CS server, and it will show the answer??? Does it work like that? like in the stand-alone CS??  if it is so, can you please give me an example of that null-termianted text string sintax??? Thanks for all, hope Im not abusing for your support.

Thanks Advanced.

 

 
  [ # 26 ]

You cannot talk to CS server manually. It talks over a tcp socket. There is a batch file localclient.bat that you can use to talk to your local server, and presumably if you launched several copies of that at the same time, each with a different login name, you could type as multiple people into them. But that client doesnt do cut and paste.

 

 
  [ # 27 ]

Thanks bruce, for your valuable information.
Ill try to communicate throught that tcp socket, does that tcp socket has any specification I could start searching for? what about the “concatenation of three null-terminated text strings” what is its syntax? once again many thanks.
Thanks Advanced.

 

 
  [ # 28 ]

TCP sockets are created by code in various languages including javascript, php, C, etc.

The message you send over is is just the concatenation of three C text strings.
A C text string is a sequence of ascii characters, terminated by the null character (value 0).
The conconcatenation is merely 3 of them jammed together and sent as a unit.  If 0 represents ascii null, this is such a message:

myusername00message0

Where my user name is the login name of the user, you can use a null string (no characters other than the terminator) for the botname to use the default bot, and the message to send the bot.

 

 
  [ # 29 ]

Many Thanks Bruce,
so I just need
port 1024
IP 127.0.0.1
and the “three null-terminated text strings”

Ill try it out.
Thanks for all.

 

 
  [ # 30 ]

Hi Bruce

I verify that I allowed port 1024 inside the firewall settings (windows8.1)
also I used this method (netstat -aon | more) in cmd (from this webpage “http://mywindows8.org/check-which-tcpip-ports-are-in-use/”) to tell which tcp port was in use by which applications.
So. When I run “LocalServer.bat” from SERVER BATCH FILES, (netstat -aon | more) showed me that chatscript was using… TCP, Local Address 0.0.0.0:1024, Foreign Address 0.0.0.0:0, State LISTENINIG
But when I run “chatscript.exe” from the top directory and then inside chatscript “black console?”(directory right?) I type ChatScript port=1024, or chatscript port=1024, nothing happens, and then (netstat -aon | more) didn’t showed me chatscript in the list of TCPs that were being used, so ChatScript was not in server mode, and it was not using any port.
So, typing “ChatScript port=1024” in the “black console”(directory) didn’t work? am I doing something wrong? how can I enabled chatscript in server mode?? Do I need to build a webpage anyway??

Since when I run the “LocalServer.bat” I got the TCP connection enabled, So I tried to “Invoke a Web Service” in my macrorecorder, I use the port 127.0.0.1:1024 and the message “eb0harold0hi0” but the connection just kept wainting until it reached its time limit (set by the macrorecorder) and it stopped, but at the same time I get a message in the ChatScript console saying: “TCP 127.0.0.1 closed connection prematurely.” So I guess ChatScript kinda recive it, but the message was not quite right? am I wrong? Any clue?

Once Again, THanks Advanced Bruce for your support.

 

 < 1 2 3 4 > 
2 of 4
 
  login or register to react