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

help with server implementation. Can I run CS from a different program?
 
 

Sorry if I’m too off topic. I have no background on web applications or servers or anything which I should know to use ChatScript via server. Hours on google haven’t helped, apperently cos I don’t know how to phrase my searches. Could I be helped with references on everything related to this?
I don’t even know; once I run on server mode, how do clients access it? with a browser?

I’m currently working on a MAC and once I start trail tests it will most likely be on a Linux server (not by choice). So for now I guess I need to use LocalClient.bat ...


Is it possible to run CS via a different program such as Python or C++? I saw 2 threads here with Python code, but I couldn’t get either to work for me.

Thanks!

 

 
  [ # 1 ]

When the system is running in server mode, a client communicates with it by a standard socket communication.
The client (webpage or app) opens a socket to a given IP:port address and writes a message to that socket (see manual for message format). The server sends back the text response on that socket and both sides close the socket. Each volley is a new socket open/close.

I’m not sure what you have in mind by “running CS via a different program”.  It is possible to embed chatscript within another stand-alone app…. bypassing the “main()” startup and manually initializing from outside of the chatscript code and then making your own calls to do a volley.  Such is done for Tom Loves Angela on iPhone.

 

 
  [ # 2 ]

The GUI app that I wrote for ChatScript uses sockets to communicate with an already running CS server on localhost. You can do more or less the same thing with a web interface, but you’re going to have access to a globally accessible ChatScript server in order to make it work, and that’s where a number of folks so far are running into trouble. You see, all of the web hosting providers that I’ve talked to so far have refused to allow the installation/running of what they consider to be “new and untested” software on their systems unless I was willing to shell out a lot of cash for a dedicated server. The minimum cost involved that I’ve found so far is a $300USD setup fee plus $100USD per month, which far exceeds my budget.

 

 
  [ # 3 ]

I should be clearer in my intentions.
I’m working (solo) on a chat app which is intended to be accessible to many people via web and even through text messages. I have no idea how to do that, but I have time. From what I’ve read I believed I could do it with CS (I’m allowed access to the required hardware, i.e servers, network access, security, etc).

I’ll start reading about “standard socket communication”. However, in such a case that I can’t handle all the necessary communications in CS (between severs, database, etc), maybe I could have another program, like a python or C++ script, handle CS. I’m too far off to know, but since I must have a beta by August, I’m trying to learn my options. At least in terms of NLU, so far so good grin

 

 
  [ # 4 ]

OK….

A chatscript server SOUNDS like it would be operating in server mode. 

It does not have to be directly in-line with the user. You could from your webpage/app communicate with a python script or any other system, THAT system could communicate to chatscript as a local or remote server using a socket, get back the text and do something with it, including using the results to access a db or google or whatever. Then the results of THAT could be sent back by your system to the app.  That’s one scenario and probably the best.

Another scenario is Chatscript is direct, but executes other programs on the machine via the system interface. THAT is probably LESS desirable, because chatscript cannot do that asynchronously, so you are blocking the chatscript server from responding to other NL requests while awaiting a db or google or whatever operation.

 

 
  [ # 5 ]

if you can read c/c++ code, a simple client socket to a chatscript server is implemented in src/csocket.cpp as the test client function void Client(char* login)// test client for a server

 

 
  login or register to react