AI Zone Admin Forum Add your forum

NEWS: survey on 3000 US and UK consumers shows it is time for chatbot integration in customer service!read more..

Using Mongo DB as file server

Hi all,

I’am Corentin and i’am working on Chatbots for a business : Addventa.

I’am a beginner on ChatScript and i’am trying to discover and I try to discover this by trying everything possible.

Currently, i’am trying to configure ChatScript to make it use MongoDB for the USERS folder instead of having it locally, but I can’t do it.

These are the steps i did :
[Windows 10 - 64 bits ]

1 - Installed last version of ChatScript.
2 - Installed mongoDB, and configured it
3 - Used RoboMongo to check my Database (Run perfectly)

4 - Set the variable : mongo=“mongodb://localhost:27017 ChatScript topic:MyCollection” (as said in the ChatScript documentation : ‘HTMLDOCUMENTATION/ESOTERIC-CHATSCRIPT/ChatScript-MongoDB.html’)
5 - Used ChatScriptmongo executable to Build1 my personnal botdata (local language=FRENCH build1=files.txt).

6 - Launched ChatScriptmongo executable as a server (language=FRENCH port=1025).
7 - Launched ChatScriptmongo executable as a client (login=me client=localhost:1025).

The client working perfectly, but ChatScript still writing in USERS folder instead of using mongoDB.

Did you have this type of trouble ?
Do you have any solutions please ?




  [ # 1 ]

I just tryed another way proposed in the documentation :

Access A Mongo Database

I used the function ^mongoinit( server domain collection ) in botdata files, and called it at start, but it seems that it’s not declared even when i’am using ChatScriptmongo executable.

These are the steps i followed :
1 - have a mongoDB with a DB named ‘ChatScript’ and a collection named ‘USERS’.
2 - Called ^mongoinit ( localhost:27017 ChatScript USERS ) in my first topic file in a t: ().

But when i compile i try to build i have this erro : Apparent call to ^mongoinit is not yet defined

Does someone had the same problem ?
Any solution please ?




  [ # 2 ]

You carefully described a variable as: mongo=“mongodb://localhost:27017 ChatScript topic:MyCollection   and for the server you describe: language=FRENCH port=1025 . Did you actually mean to say:
language=FRENCH port=1025 mongo=“mongodb://localhost:27017 ChatScript topic:MyCollection”  ?

However, the executable is not compiled correctly. I will fix and re-release.


  [ # 3 ]

Yes i tryed both ways, i did use mongo=“mongodb://localhost:27017 ChatScript topic:MyCollection”.

With your new release, I can write in database but ChatScript does not close connections of mongoDB so i have a lot of thread connections, then, i have a socket client problem and i can’t write in DB anymore.

By the way, is it possible to have logs users in mongoDB, because all i could see was UsersConnections ?


  [ # 4 ]

What do you mean CS does not close connections?—  If your script is explicitly opening it, it can explicitly close it.
If you are using it as a filesystem, CS would automatically close it when it shuts down.  In what way are you using it?

Logs cannot be dumped to mongo, log data per user can involve tracing etc, which generate huge numbers of writes, so they must be on a local machine.


  [ # 5 ]

I’am using my DB as a filesystem and in mongoDB i have more and more thread connections.

Alright so i have only users connections in mongoDB when i use it as a filesystem ?


  login or register to react