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

failed after rebuild
 
 

Hi!

I try to modify charscript.
For example:
  - random() function behavior
  - buffers size related to MAX_JUMP_OFFSET definition (BTW why is it =6083?)
  - маке other kind of session (like http-bind in xmpp)

I use VS2010Express (not free 2005 because __VA_ARGS__ not supported)
I have some questions to developers. Please answer if it possible.

1) Why dont you use STL? Mainly for string handling
2) I found XMPPmain defined in mainSystem.cpp, but no sources. Does it exists?
3) What is the best way to implement long-polling session (lile http-bind in xmpp)
4) What does it mean “Bad UTF-8 in…” in ReadALine(...) of textUtilites.cpp?
I have got it just compiled without modifications and run locally on the same machine client and server. I have Window7.

Thank you.

 

 
  [ # 1 ]

MAX_JUMP_OFFSET is tied to how the system internally stores and uses jump offsets.
A topic is a collection of rules. Each rule is preceeded by a jump offset to allow one to jump past that rule to the next one (an optimization over having to scan to get past the rule). The system uses 2 bytes to hold that offset, but the 2 bytes must be legal characters and decode is kept simple. So that gives that limit. And since in general I think a rule that goes significantly above that is getting complicated, I have been happy with it. What issues do you have with it?

Why not use STL? I like to maintain complete control over all memory allocation.

XMPPmain is not supported for a release to the world. I sometimes use the system in conjunction with XMPP, hence the ability to add sources to do so.

BAD-UTF-8— currently ChatScript only supports plain ascii. The system detects characters outside of it, warns you, and revises the code.

I don’t know what “long-polling session” really implies so I can’t currently comment.

 

 

 
  [ # 2 ]

My trouble with MAX_JUMP_OFFSET is text response count limitation on given rule…

So if applicattion support only ascii it means app doesn’t work on Linux (on my used utf-8), am I right?
What is minimal changes I need to do to get it work on Linux?

“Long pooling session” - maybe I am use not well correct.
My API will be like XMP(JSON)-RPC. No long live session.
Only requests from time to time. Each request open and close socket connection.

 

 
  [ # 3 ]

Currently the system works on Linux as is.  But it does not support foreign words particularly.  And as a server on linux is already has no long-lived session. It opens and closes a socket for each input from a user.  It DOES maintain a file to track each specific user’s state which it loads, uses, then writes with each volley.

As for text response. You are saying that you want to output more than 6000 characters in an answer to a user?
I could make sure it was easy to change this limit.

 

 
  [ # 4 ]

I make fix in csocket.cpp, it was mistake with strcpy into inputFeed buffer

static void* MainChatbotServer()
{
...
  while (1)
  {
      ServerGetChatLock();
      // chatlock mutex controls whether server is processing data or client can hand server data.
      // That we now have it means a client has data for us.
      // we own the chatLock again from here on so no new client can try to pass in data.
      // CLIENT has passed server in globals:  clientBuffer (ip,user,bot,message)
      // We will send back his answer in clientBuffer, overwriting it.
 
      char ip[MAX_WORD_SIZE];
      char user[MAX_WORD_SIZE];
      char bot[MAX_WORD_SIZE];
     
      char* p = clientBuffer; strcpy(ip, p);
      p = p + strlen(p) + 1; strcpy(user, p);
      p = p + strlen(p) + 1; strcpy(bot, p);
      p = p + strlen(p) + 1; strcpy(inputFeed, p);
...

 

 

 
  [ # 5 ]

Right, thanks. That was already found and fixed in the recent 1.26 release.

 

 
  [ # 6 ]

Is there any way to change size limitation of responses on a given rule? I need to provide a wide variety of answers for one question.  I get errors by exceeding of the size, the last one was “In topic ~unknown-topic missing colon for responder t - look at prior responder for bug”.
btw when I exceed size for one symbol - system freezes.

 

 
  [ # 7 ]

really I don’t understand formula of 6083

As I understand Bruce want readable form of offset. That is why he use / 75, % 75 in Encode(), Decode() function,
but why 75?..

Bruce, can you explain your method?
I need increase number variants of responses too.

If we needn’t debug script compiledecompile functionality we can use more simple form of storage offsets? For example in 4 bytes (printable) or in binary.

 

 
  [ # 8 ]

Actually, it could probably go to 77, but that wont help you.  The limitation is on available printable simple ascii characters that don’t conflict with other uses by the system.

I can modify the engine to use a 3-byte jump offset instead of a 2-byte one. And I could make that compile switchable. So I will do that. Probably this weekend.

Can you give me an example of a responder you want which is larger than it can handle?

As for :“In topic ~unknown-topic missing colon for responder t - look at prior responder for bug”.
This says you have a script bug. that in the responder before you failed to make it correctly, probably leaving out a colon.

 

 
  [ # 9 ]

Bruce, this weekend is Christmas. I’m sure everyone here would understand if you put it off for a few days. smile

Enjoy your holiday. smile

 

 
  [ # 10 ]
Dave Morton - Dec 23, 2011:

Bruce, this weekend is Christmas. I’m sure everyone here would understand if you put it off for a few days. smile

Enjoy your holiday. smile

Oh no no no no no…. you work right threw xmas and new years… 24 hours a day until it is fixed Bruce…

kidding…. no, listen to Dave… it is enough you have provided a lot of free software for everyone.. time to relax smile

 

 
  [ # 11 ]

Look, I have a set of responses for some rule, for example
u: ( test )
[ This is first answer. ]
[ This is second answer. ]
[ This is third answer. ]
[ This is fourth answ ]
And it works fine. When I add single character into one of answers, for example
u: ( test )
[ This is first answer. ]
[ This is second answer. ]
[ This is third answer. ]
[ This is fourth answe ]
- system freezes.
When I add one more character (or couple, it does not matter)  into any response:
u: ( test )
[ This is first answer. ]
[ This is second answer. ]
[ This is third answer. ]
[ This is fourth answer. ]
- I have the above error. (“missing colon for responder”)
I can’t understand, why error occurs only when having some length.

 

 
  [ # 12 ]

I presume the example you give is not a literal one, since it is nowhere near size limits.
To debug your situation, I would need actual data, INCLUDING seeing the responder before this one.
Could you email me the file involved?  gowilcox at gmail

 

 
  [ # 13 ]

I will be expanding the size of responders, but you and victor should also read the new topic on Multiple Personality Syndrome for some coding suggestions.

 

 
  [ # 14 ]

new version up, extends the size range of a responder

 

 
  [ # 15 ]

Thanks very much, but I’ve noticed that legal topic size remains the same. Is it possible to change it? Sometimes it is inconvenient to split topics.

 

 1 2 > 
1 of 2
 
  login or register to react
‹‹ Call to Arms      What about UTF-8 support? ››