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?
 
 

Hi,
Im trying to implement a database with ChatScript

I have installed PostgreSQL9.4 (32bit) from here
http://www.enterprisedb.com/products-services-training/pgdownload#windows

then I installed the ODBC driver psqlodbc_09_03_0400.zip from here
http://www.postgresql.org/ftp/odbc/versions/msi/

In Windows8, in the “ODBC Data Source Administrator (32-bit)” setup, should I add PostgreSQL ANSI or PostgreSQL Unicode? both have 32bit and 64bit version, which I should pick? Ive heard that even when you install PostgreSQL (32bit) the ODBC connector should be the same bits as your OS not as your PostgreSQL program, is that true?

Please, someone who have install PostgreSQL could provide his experience.

Thanks Advanced.

 

 
  [ # 1 ]

I have already set a succesful connection using the… PostgreSQL35W PostgreSQL Unicode(x64)
this is the file odbc I installed
psqlodbc_09_03_0300-x64-1.zip
I downloaded from here
http://www.postgresql.org/ftp/odbc/versions/msi/

I have test it in “ODBC Data Source Administrator (64-bit)” and it worked
I have tried to ask a query in another software and it worked

it is any problem if it is a Unicode database? or should I choose ANSI???
How does exactly the database work with Chatscript? which manual should I read from?

Thanks Advanced.

 

 
  [ # 2 ]

DOCUMENTATION/ESOTERIC/Postgres

 

 
  [ # 3 ]

Thanks Bruce,
I have already read it,
isn’t there more info about PostgreSQL in Andanved User Manual?
How exactly ChatScript manage to talk with several users at same time using database?
Do I still have to run the chatscript.exe? how can I switch between users?
I would like to got the same chatbot to talk with several users at same time, I mean lets say my chatbot has 3 topics, like introduction, development and conclusion. I would like this chatbot to keep a chat with different users at same time, so it may be in the introduction with userA, and at the same time it would be in the conclusion with userB, and in the development with userC. And so on with lets say 20 users at same time. Is this possible, How do ChatScript manage this?

THanks Advanced.

 

 
  [ # 4 ]

Postgres is merely accessed by ChatScript. So of course you have to run chatscript.exe. It runs as a server. Your script accesses postgres however you tell it to.

Currently Postgres is a source of information your bot can access. It is NOT a source of storing the user’s state for running multiple servers which can run any user. That is simply a single server keeping files on each user.  The use of Postgres to store user state is a change I will be making to CS in the next month.  A CS server by definition can talk to multiple users. They think of it as at the same time. CS processes one at a time. So what. When you process in milliseconds and users act in seconds, user’s do not notice any issues until you have enough of them. When you do, you can (if Linux) run one CS per core and still share the same file system. When you need more users handled than that, then you need a central file system with multiple CS server machines, and the change to CS to support that will then be useful.

 

 
  [ # 5 ]

Thanks Bruce
but I have some doubts

When you say… “the user state” you mean each user’s conversation??
like is explained in the Basic user Manual?
“History Files: Each user’s conversation is tracked by the system and kept in files in the
USERS directory. A user can return to chat with a personality days later, and the system
knows what has happened in previous conversations and that this is the start of a new
conversation.”

So, this above is the way Chatscript.exe stores each user’s conversation by default (in files).
Do you mean using CS with PostgreSQL stores the same info but in a database, and it can not be accessed at same time by many users?? am I right? or CS with PostgreSQL stores a different kind of info??

When you say…
“A CS server by definition can talk to multiple users. They think of it as at the same time. CS processes one at a time. So what. When you process in milliseconds and users act in seconds, user’s do not notice any issues until you have enough of them.”

So, it’s possible to talk to many users with a small delay between each of them?, if this is so, how do I manage to switch between users in ChatScript.exe? do I need to run multiple instances of ChatScript.exe, each one for each new user that I would like to talk to? do I need to change the user via some command inside the same ChatScript.exe?

Sorry if I didn’t get it, or my guesses are to bad
I am running Windows8

Thanks Advanced

 

 
  [ # 6 ]
Eduardo Bedoya - May 20, 2015:

Thanks Bruce
but I have some doubts

When you say…
“A CS server by definition can talk to multiple users. They think of it as at the same time. CS processes one at a time. So what. When you process in milliseconds and users act in seconds, user’s do not notice any issues until you have enough of them.”

So, it’s possible to talk to many users with a small delay between each of them?, if this is so, how do I manage to switch between users in ChatScript.exe? do I need to run multiple instances of ChatScript.exe, each one for each new user that I would like to talk to? do I need to change the user via some command inside the same ChatScript.exe?

Sorry if I didn’t get it, or my guesses are to bad
I am running Windows8

Thanks Advanced

We are running ChatScript in Windows with about 100 students. Not all are asking questions at the same time but we have had 10 or 20 doing so at once. In some cases, each user is talking to one of several different bots.

ChatScript keeps the individual conversations straight because each user logs in with their own name and from a unique ip address. Based on the logs, as far as I can tell ChatScript has never gotten two users confused but I haven’t exhaustively searched for that possibility. We start a single instance of ChatScript.exe in server mode and it loads the topic files for 10 bots. We access ChatScript directly or from a Unity front end and the response to the question is essentially instantaneous. Our topic files are not large (a couple thousand rules).

We are not using Postgres so I don’t know if our situation is relevant to yours.

Doug Danforth

 

 
  [ # 7 ]

Thanks Doug Danforth for your support.

Do you mean Front end development? So students access ChatScript from internet or local network right?

Im not quite sure about how to start ChatScript.exe in server mode, isn’t started in server mode by default?

I have to thank you again for your comment, because…
I have read your case in order to image how could I solve mine, and I realized that I forgot to mention a detail in my case (I don’t know if it is crucial or not). In my case I don’t own a webpage in which user’s chat with the chatbot, does this make a big difference? Do I need a webpage in order to get ChatScript to chat with several users at same time??, I really was thinking more about a macro that gathers different users chats from instant messages services like skype and send them to ChatScript, from 20 to 40 user chating with the same unique Chatbot, is this possible?? I guess it’s more as if all users were accessing ChatScript.exe from a single computer?? Any workaround??

Hope it make sense
Thanks Advanced.

 

 
  [ # 8 ]

EDIT>
Since I only need a single ChatScript.exe to chat with several users at same time. How do I manage to switch between users in ChatScript.exe? Do I need to change the user name via some command inside the same ChatScript.exe?

What is the main difference between chatscript history files w/o postgres and chatscript postgres database (what information is stored in postgress?)

Thanks Advanced.

 

 
  [ # 9 ]

Let us separate CS and Postgres for a moment.

When CS is running as a server, it can communicate with multiple users at the same time (and will keep them straight). You are responsible for communications with chatscript. You send via TCP 3 pieces of information to CS. The user identifier (which could be a name or an ip address), the name of the bot you want the user to talk to (or null for the default bot), and the message the user is saying. Users do not “directly” talk to CS as users do not communicate in TCP. 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. Typically for web based applications, the ip address of the user is used to label the user. For systems belonging to organizations, they typically have login names assigned to users, and verify their identity. And the webpage sends the login name as the users name.  A single CS server can nominally handle 1000 simultaneous users conversing with it.  In Linux, by default CS runs in server mode. In Windows you have to give a port=nn parameter to launch CS in server mode.

Now back to postgres. Currently postgres is a data store where a bot can read and write data from. This is not the data about the user which is stored in USERS. This is whatever data the script says to read and write. For example I have a bot that indexes wikipedia articles, storing a word, where it exists in a sentence, the sentence, what part of speech the word is, etc.  Then I can query to find all articles that mention Beethoven.

SOMEDAY, not currently, you will be able to direct CS to use Postgres as a place to store USER topic files, instead of that being done in files. That would enable multiple CS servers to serve arbitrarily large collections of users because each machine to use access the shared-file server of postgres. That’s how one would scale CS to handle 1 million simultaneous users, for example. (By then I will probably also be supporting AWS DynamoDB).

 

 
  [ # 10 ]

Hi Bruce, Thanks for your explanation

A single CS server can nominally handle 1000 users at same time, but how many different users profiles can be stored in a CS server USER directory? Can I have 10000 user profiles provided that I only talk with 1000 at same time? In other words what is the limit of a CS server USER directory size?

How can I create ChatScript in server mode, can it work as server in a local network? eg. I would like CS Server be placed in PC1, and PC2 and PC3 send TCP to PC1 server via local network, is this possible? is there any manual? which are the codes to create the TCP socket? eg. I have heard TCP Ip ports are configured through your firewall, taht there are several ways to automate your firewall, like through the command line.

“Currently postgres is a data store where a bot can read and write data from.”
Is it possible the set my bot so it stores in postgreSQL only all unknown user input it may recive from users (when there isn’t any keyword matching, so bot uses a quibble)? if this is so, is it possible to stored all the recived unknwon user input from two bots installed in two different PCs in a single PostgreSQL database? any workaround to achieve this, since it will speed up Chatbot maintenance.

Thanks Advanced Bruce
Hope Im not abusing of your support
Thank for all Again, Regards

 

 
  [ # 11 ]
Eduardo Bedoya - May 20, 2015:

Hi Bruce, Thanks for your explanation

How can I create ChatScript in server mode, can it work as server in a local network? eg. I would like CS Server be placed in PC1, and PC2 and PC3 send TCP to PC1 server via local network, is this possible? is there any manual? which are the codes to create the TCP socket? eg. I have heard TCP Ip ports are configured through your firewall, taht there are several ways to automate your firewall, like through the command line.

There is a folder in ChatScript called SERVER BATCH FILES that contain batch files for running CS as a server and as a client. If you inspect these two files you will see the correct syntax for running CS as a server or client. If you double click on the LocalServer.bat file it will launch CS in server mode. If you then click on LocalClient.bat it will launch a client that will talk to the server you just started.

If you want to run the server on one machine and the client on another machine on the network, then double click on LocalServer.bat to start the server. Copy the entire ChatScript folder to the other machine and edit LocalClient.bat to look something like this.

cd ..
ChatScript client=xxx.xxx.xxx.xxx:1024

and replace xxx.xxx with the ip adress or name of the server. Double click on that and you should be talking to the server running on the other machine.

If you log in with your name only you get the default bot. If you log in with your name followed by :bot2 (or whatever you call your bots) then you will talk to bot2.

Hope this helps,

Doug

 

 
  [ # 12 ]

Thanks Doug for your support,
it solved some questions, though there is still some other ones remaining.

Thanks.

 

 
  [ # 13 ]

Thanks Bruce and Doug
Right now Im reading documentation clients and servers.
Thanks for your support.

 

 
  [ # 14 ]

the limit of a users directory is the limit of your hard directory. You could have a million different users in it.
Depending on your OS, one can improve performance of finding the correct user among millions, but you dont need that ability at present.

“Currently postgres is a data store where a bot can read and write data from.”
Is it possible the set my bot so it stores in postgreSQL only all unknown user input it may recive from users (when there isn’t any keyword matching, so bot uses a quibble)? if this is so, is it possible to stored all the recived unknwon user input from two bots installed in two different PCs in a single PostgreSQL database? any workaround to achieve this, since it will speed up Chatbot maintenance.

The answer to the above is YES.

How can I create ChatScript in server mode, can it work as server in a local network? eg. I would like CS Server be placed in PC1, and PC2 and PC3 send TCP to PC1 server via local network, is this possible?

CS server on PC1 can be accessed by local or non-local hosts, depending primarily on whether ports are made visible or not to the other hosts.

 

 
  [ # 15 ]

Thanks Bruce, Ill test it out

 

 1 2 3 >  Last ›
1 of 4
 
  login or register to react