8000 ChatScript 10.6 release · ChatScript/ChatScript@af00e9f · GitHub
[go: up one dir, main page]

Skip to content

Commit af00e9f

Browse files
committed
ChatScript 10.6 release
1 parent 305a3ae commit af00e9f

File tree

118 files changed

+1081
-374
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

118 files changed

+1081
-374
lines changed

BINARIES/ChatScriptMysql.exe

15 KB
Binary file not shown.

BINARIES/ChatScriptmongo.exe

15 KB
Binary file not shown.

BINARIES/ChatScriptpg.exe

15.5 KB
Binary file not shown.

BINARIES/LinuxChatScript64

15.4 KB
Binary file not shown.

BINARIES/chatscript.dll

15.5 KB
Binary file not shown.

BINARIES/chatscript.exe

15 KB
Binary file not shown.

DICT/ENGLISH/dict.bin

0 Bytes
Binary file not shown.

HTMLDOCUMENTATION/CLIENTS-AND-SERVERS/ChatScript-Amazon-Server.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,8 @@
1010
<body>
1111
<h1 id="chatscript---setting-up-an-amazon-ec2-server">ChatScript - Setting up an Amazon EC2 Server</h1>
1212
<blockquote>
13-
<p>Copyright Bruce Wilcox, gowilcox@gmail.com</p>
13+
<p>Copyright Bruce Wilcox, gowilcox@gmail.com <br>Revision 8/23/2020 cs10.6</p>
1414
</blockquote>
15-
<p><br>Revision 9/24/2017 cs7.55</p>
1615
<p>If you want to make your chatbot visible on the web, you need a server. As it turns out, for low traffic, Amazon will let you have a server machine for free for a year and a low fee thereafter. Here is an overview of how to create a ChatScript server on Amazon's cloud services.</p>
1716
<p>First, you need an Amazon AWS account. Go to http://aws.amazon.com/account/ and sign up for one if you don't have one.</p>
1817
<p>Second, you need to acquire a server machine. You get one by going to the AWS console: https://console.aws.amazon.com/console/home and clicking on the EC2 (virtual servers in the cloud) link.</p>
@@ -37,6 +36,8 @@ <h1 id="chatscript---setting-up-an-amazon-ec2-server">ChatScript - Setting up an
3736
<li>I needed php to run my webpage, so I did yum install php`</li>
3837
<li>If you want to be able to debug using gdb the engine itself, and compiling with make and g++ you want to do yum groupinstall &quot;Development Tools&quot;. You may have to do this anyway or use a different package to get the std c library</li>
3938
</ol>
39+
<p>In fact, for some machines like CentOS, to get json stuff and evserver stuff, and you want to compile the source, you may need</p>
40+
<pre><code>sudo yum -y install -y libc -devel gcc libc6 -compat libcurl libcurl-devel libstdc++ libgcc glibc make gcc-c++</code></pre>
4041
<p>For Ubuntu linux:</p>
4142
<ol style="list-style-type: decimal">
4243
<li><code>sudo apt-get install make</code> - to get make installed</li>

HTMLDOCUMENTATION/CLIENTS-AND-SERVERS/ChatScript-ClientServer-Manual.html

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,22 @@ <h1 id="chatscript-clientserver-manual">ChatScript Client/Server Manual</h1>
1313
<p>Copyright Bruce Wilcox, gowilcox@gmail.com brilligunderstanding.com <br>Revision 3/29/2020 cs10.1</p>
1414
</blockquote>
1515
<ul>
16-
<li><a href="ChatScript-ClientServer-Manual.html#running-the-server">Running the server</a></li>
17-
<li><a href="ChatScript-ClientServer-Manual.html#unique-user-names">Unique User Names</a></li>
18-
<li><a href="ChatScript-ClientServer-Manual.html#chatscript-protocol">ChatScript protocol</a></li>
19-
<li><a href="ChatScript-ClientServer-Manual.html#communicating-with-the-server">Communicating with the Server</a></li>
20-
<li><a href="ChatScript-ClientServer-Manual.html#testing-the-server">Testing the server</a></li>
21-
<li><a href="ChatScript-ClientServer-Manual.html#revising-a-live-server">Revising a live server</a></li>
22-
<li><a href="ChatScript-ClientServer-Manual.html#revising-a-topic">Revising a topic</a></li>
23-
<li><a href="ChatScript-ClientServer-Manual.html#preparing-for-compiling-on-a-server">Preparing for compiling on a server</a></li>
24-
<li><a href="ChatScript-ClientServer-Manual.html#testing-for-server-presence">Testing for server presence</a></li>
25-
<li><a href="ChatScript-ClientServer-Manual.html#server-crashes--cron">Server crashes and cron</a></li>
26-
<li><a href="ChatScript-ClientServer-Manual.html#cpu-vs-io-bound">CPU vs IO bound</a></li>
27-
<li><a href="ChatScript-ClientServer-Manual.html#memory-issues-with-multiple-servers-on-a-machine">Memory issues with multiple servers on a machine</a></li>
28-
<li><a href="ChatScript-ClientServer-Manual.html#commands-affecting-the-server">Commands affecting the server</a></li>
29-
<li><a href="ChatScript-ClientServer-Manual.html#command-authorization">Command Authorization</a></li>
30-
<li><a href="ChatScript-ClientServer-Manual.html#restful-server">RESTful server</a></li>
31-
<li><a href="ChatScript-ClientServer-Manual.html#encrption">Encryption</a></li>
16+
<li><a href="ChatScript-ClientServer-Manual.md#running-the-server">Running the server</a></li>
17+
<li><a href="ChatScript-ClientServer-Manual.md#unique-user-names">Unique User Names</a></li>
18+
<li><a href="ChatScript-ClientServer-Manual.md#chatscript-protocol">ChatScript protocol</a></li>
19+
<li><a href="ChatScript-ClientServer-Manual.md#communicating-with-the-server">Communicating with the Server</a></li>
20+
<li><a href="ChatScript-ClientServer-Manual.md#testing-the-server">Testing the server</a></li>
21+
<li><a href="ChatScript-ClientServer-Manual.md#revising-a-live-server">Revising a live server</a></li>
22+
<li><a href="ChatScript-ClientServer-Manual.md#revising-a-topic">Revising a topic</a></li>
23+
<li><a href="ChatScript-ClientServer-Manual.md#preparing-for-compiling-on-a-server">Preparing for compiling on a server</a></li>
24+
<li><a href="ChatScript-ClientServer-Manual.md#testing-for-server-presence">Testing for server presence</a></li>
25+
<li><a href="ChatScript-ClientServer-Manual.md#server-crashes--cron">Server crashes and cron</a></li>
26+
<li><a href="ChatScript-ClientServer-Manual.md#cpu-vs-io-bound">CPU vs IO bound</a></li>
27+
<li><a href="ChatScript-ClientServer-Manual.md#memory-issues-with-multiple-servers-on-a-machine">Memory issues with multiple servers on a machine</a></li>
28+
<li><a href="ChatScript-ClientServer-Manual.md#commands-affecting-the-server">Commands affecting the server</a></li>
29+
<li><a href="ChatScript-ClientServer-Manual.md#command-authorization">Command Authorization</a></li>
30+
<li><a href="ChatScript-ClientServer-Manual.md#restful-server">RESTful server</a></li>
31+
<li><a href="ChatScript-ClientServer-Manual.md#encrption">Encryption</a></li>
3232
</ul>
3333
<p>While the system defaults to running as a stand-alone chatbot under Windows, when run under LINUX it defaults to being a server.</p>
3434
<p>Nominally (meaning depending on hardware and what your bot does) ChatScript can process a volley on a single core in 10 milliseconds on a slow machine, thus handling 100 volleys every second from different users using one core. A human-human volley is often around 15 seconds, so handling 1000 simultaneous users with a single core slow server is not unreasonable.</p>

HTMLDOCUMENTATION/ChatScript-Command-Line-Parameters.html

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
</head>
1010
<body>
1111
<h1 id="chatscript-command-line-parameters">ChatScript Command Line Parameters</h1>
12-
<p>Copyright Bruce Wilcox, gowilcox@gmail.com www.brilligunderstanding.com<br> <br>Revision 7/18/2020 cs10.5</p>
12+
<p>Copyright Bruce Wilcox, gowilcox@gmail.com www.brilligunderstanding.com<br> <br>Revision 8/23/2020 cs10.6</p>
1313
<h1 id="command-line-parameters">Command Line Parameters</h1>
1414
<p>You can give parameters on the run command or in a config file or via a http request. The default config file is <code>cs_init.txt</code> at the top level of CS (if the file exists). A second file if present can add or override values - cs_initmore.txt And then third level named after the current language chosen can override those two cs_initenglish.txt being the default. The language one, in particular is useful to rebalance memory sizings (dictionary entries in particular) since foreign languages require more entries than English.</p>
1515
<p>Or you can name where the file is on a command line parameter <code>config=xxx</code>. And <code>config2=xxx</code> for the initmore file. If you have secret information that you don't want stored in a config file or exposed on a command line then you can request the config data from a URL. Use the command line parameter configurl=http://xxx to specify the address of the data. Additional command line parameters, configheader=xxx, can be included to define HTTP request headers. If there are several headers then use separate configheader=xxx configheader=yyy etc parameters for each header name/value pair.</p>
@@ -145,22 +145,26 @@ <h2 id="file-options">File options</h2>
145145
<td>Store a user-bot log in USERS directory (default)</td>
146146
</tr>
147147
<tr class="odd">
148+
<td><code>userlog=1</code></td>
149+
<td>alternate form of request, you can use 0 for off and 1 for on</td>
150+
</tr>
151+
<tr class="even">
148152
<td><code>nouserlog</code></td>
149153
<td>Don't store a user-bot log</td>
150154
</tr>
151-
<tr class="even">
155+
<tr class="odd">
152156
<td><code>tmp=xxx</code></td>
153157
<td>name relative or absolute path to where you want the TMP folder to be. Do not add trailing <code>/</code></td>
154158
</tr>
155-
<tr class="odd">
159+
<tr class="even">
156160
<td><code>crashpath=xxx</code></td>
157161
<td>file to write about fatal Linux signals that will be outside of the cs folder <code>/</code></td>
158162
</tr>
159-
<tr class="even">
163+
<tr class="odd">
160164
<td><code>windowsbuglog=xxx</code></td>
161165
<td>names a WINDOWS directory to replicate the BUGS.txt log file outside of the CS directory area</td>
162166
</tr>
163-
<tr class="odd">
167+
<tr class="even">
164168
<td><code>linuxsbuglog=xxx</code></td>
165169
<td>names a LINUX directory to replicate the BUGS.txt log file outside of the CS directory area</td>
166170
</tr>
@@ -390,11 +394,11 @@ <h3 id="user-caching">User Caching</h3>
390394
<h2 id="logging-or-not">Logging or Not</h2>
391395
<p>In stand-alone mode the system logs what a user says with a bot in the USERS folder. It can also do this in server mode. It can also log what the server itself does. But logging slows down the system. Particularly if you have an intervening server running and it is logging things, you may have no use whatsoever for ChatScript's logging.</p>
392396
<pre><code>Userlog</code></pre>
393-
<p>Store a user-bot log in USERS directory. Stand-alone default if unspecified.</p>
397+
<p>Store a user-bot log in USERS directory. Stand-alone default if unspecified. Alternatively you can do userlog=1 to enable.</p>
394398
<pre><code>Nouserlog</code></pre>
395-
<p>Don't store a user-bot log. Server default if unspecified.</p>
399+
<p>Don't store a user-bot log. Server default if unspecified. Alternatively you can do userlog=0 to disable.</p>
396400
<pre><code>Serverlog</code></pre>
397-
<p>Write a server log and a bugs log.</p>
401+
<p>Write a server log and a bugs log. Alternatively you can do serverlog=1 to enable.</p>
398402
<p>The server log will be put into the LOGS directory under serverlogxxx.txt where xxx is the port.</p>
399403
<p>The bugs log is in the same directory under bugs.txt (all ports).</p>
400404
<pre><code>Noserverprelog</code></pre>
@@ -404,11 +408,13 @@ <h2 id="logging-or-not">Logging or Not</h2>
404408
<pre><code>Serverctrlz</code></pre>
405409
<p>Have server terminate its output with 0x00 0xfe 0xff as a verification the client received the entire message, since without sending to server, client cannot be positive the connection wasn't broken somewhere and await more input forever.</p>
406410
<pre><code>Noserverlog</code></pre>
407-
<p>Don't write a server log or a bugs log.</p>
411+
<p>Don't write a server log or a bugs log. Alternatively you can do serverlog=0 to disable.</p>
408412
<pre><code>Nobuglog</code></pre>
409413
<p>Don't write a server bugs log.</p>
410414
<pre><code>Buglog</code></pre>
411415
<p>Write a server bugs log. Use after <code>Noserverlog</code> when you want to turn off server logs but retain bug logging.</p>
416+
<pre><code>stdlogging=1</code></pre>
417+
<p>Route normal server logs to stdout and bugs logs to stderr. Useful with Docker. Use stdlogging=0 to turn off (the default).</p>
412418
<pre><code>DebugLevel=n</code></pre>
413419
<p>Sets debug level of server logging. 0 will remove logging all the startup variables and their values.</p>
414420
<pre><code>Fork=n</code></pre>

HTMLDOCUMENTATION/ChatScript-Debugging-Manual.html

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
</head>
1010
<body>
1111
<h1 id="chatscript-debugging-manual">ChatScript Debugging Manual</h1>
12-
<p>Copyright Bruce Wilcox, mailto:gowilcox@gmail.com www.brilligunderstanding.com<br> <br>Revision 7/18/2020 cs10.5</p>
12+
<p>Copyright Bruce Wilcox, mailto:gowilcox@gmail.com www.brilligunderstanding.com<br> <br>Revision 8/23/2020 cs10.6</p>
1313
<p>You've written script. It doesn't work. Now what? Now you need to debug it, fix it, and recompile it. Debugging is mostly a matter of tracing what the system does and finding out where it doesn't do what you expected.</p>
1414
<p>If you don't have Windows, then debugging mostly done by issuing debug commands to the engine, as opposed to chatting. If you have windows, you can run your program under ChatScriptIDE to debug it interactively. See the ChatScript-Debugger manual.</p>
1515
<p>If the system detects bugs during execution, they go into <code>TMP/bugs.txt</code> You can erase the entire contents of the TMP directory any time you want to. But odds are this is not your problem.</p>
@@ -24,8 +24,8 @@ <h2 id="commands"><code>:commands</code></h2>
2424
:silent - toggle silent - dont show outputs
2525
:log - dump message into log file
2626
:noreact - Disable replying to input
27-
:notime - Toggle notiming during this topic
28-
:notrace - Toggle notracing during this topic
27+
:notime - Toggle notiming during this topic or function
28+
:notrace - Toggle notracing during this topic or function
2929
:redo - Back up to turn n and try replacement user input
3030
:retry - Back up and try replacement user input or just redo last sentence
3131
:say - Make chatbot say this line
@@ -244,13 +244,13 @@ <h3 id="trace-factcreate-subject-verb-object"><code>:trace factcreate subject ve
244244
<pre><code>:trace all -infer -pattern</code></pre>
245245
<p>When I'm doing a thorough trace, I usually do</p>
246246
<pre><code>:trace all -query</code></pre>
247-
<p>because I want to see fact searches but only need the answers and not all the processing the query did.</p>
247+
<p>because I want to see fact searches but only need the answers and not all the processing the query did. If you want to see the arguments and answer to a query, you can leave :tracel all, but then do :notrace ^query. This will shut down all the internal guts of the ^query function.</p>
248248
<p>NOTE: if you want tracing to start at startup, when you don't have control, login with a botname of trace. E.g, at the login type:</p>
249249
<pre><code>john:trace</code></pre>
250250
<p>This will turn on all tracing.</p>
251251
<p><code>:trace</code> also has individual collections and items it can trace. If you just say :trace you get a listing of things.</p>
252252
<pre><code>:notrace {ON,OFF} ~topic1 ~topic2 {ON,OFF} ~topic3</code></pre>
253-
<p>Regardless of the use of <code>:trace</code>, <code>:notrace</code> marks some topics to not trace.</p>
253+
<p>Regardless of the use of <code>:trace</code>, <code>:notrace</code> marks some topics to not trace. Particularly useful to do :notrace ^Query which omits most of the guts of query calls, which can often be extensive.</p>
254254
<p>By default, the flag is set <code>ON</code> on listed topics but you can change the value on the fly to enable trace blocking on some topics or turn it off on ones previously turned on.</p>
255255
<p>You can also trace specific kinds of data. If you just say <code>:trace</code>, it will list the status of what is and is not being traced. Calls to <code>:trace</code> can be additive, you can name some and add more in another call. Here are things you can trace:</p>
256256
<table style="width:35%;">
@@ -488,6 +488,7 @@ <h3 id="testpattern-...-sentence"><code>:testpattern (...) sentence</code></h3>
488488
<pre><code>:testpattern ~aliens.ufo do you believe in aliens?</code></pre>
489489
<h3 id="topicstats"><code>:topicstats</code></h3>
490490
<p>This walks all topics and computes how many rules of various kinds you have (e.g., how big is your system). You can also just name a topic or use a wildcard like <code>~do*</code> to see all topics starting with <code>~do</code>.</p>
491+
<p>If you do :topicstats labels you just get the name of the topic and then 1 line for each rule label (indented to show rule hierarchy relationship). Simiarly :topicstats labels ~mytopic for just a single topic.</p>
491492
<h3 id="skip-n"><code>:skip n</code></h3>
492493
<p>The system will disable the next n gambits of the current topic, and tell you where you will end up next. Thereafter your next simple input like <em>ok</em> will execute that gambit, and the n previous will already have been used up.</p>
493494
<h2 id="data-display-commands">Data Display Commands</h2>

HTMLDOCUMENTATION/ChatScript-Json.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
</head>
4747
<body>
4848
<h1 id="chatscript-json-manual">ChatScript JSON Manual</h1>
49-
<p>© Bruce Wilcox, mailto:gowilcox@gmail.com www.brilligunderstanding.com <br>Revision 3/29/2020 cs10.1</p>
49+
<p>© Bruce Wilcox, mailto:gowilcox@gmail.com www.brilligunderstanding.com <br>Revision 8/23/2020 cs10.6</p>
5050
<h1 id="real-world-json">Real World JSON</h1>
5151
<p>JSON (JavaScript Object Notation) is an open standard format using human-readable text to transmit data objects over the web. It is a common standard largely replacing XML which is too wordy and hard to read. JSON has two datatypes that represent collections of values, the array and the object. A JSON array is a list of JSON entities separated by commas and placed within square brackets <code>[]</code>, e.g.,</p>
5252
<pre><code>[ A, 2, [ help, life], [] ]</code></pre>
@@ -421,6 +421,8 @@ <h3 id="jsonopen-jsonflags-kind-url-postdata-header-timeout"><code>^jsonopen</co
421421
<p>Note that the facts created are all transient and disappear at the end of the volley unless you have forced them to stay via <code>permanent</code>. Forcing them to stay is generally a bad idea because it will congest your user topic data file, slowing it down or exceeding its capacity, and because those facts may then collide with new facts created by a new <code>^jsonopen</code> on a new volley. The array and object ids are cleared at each volley, so you will be reusing the same names on new unrelated facts.</p>
422422
<p>Using the flag values, it is entirely possible to reconstruct the original JSON from the facts (if the root is an array or object because otherwise there are no facts involved), but I can't think of use cases at present where you might want to. You cannot compile CS on LINUX unless you have installed the CURL library. For Amazon machines that means doing this:</p>
423423
<pre><code>sudo yum -y install libcurl libcurl-devel</code></pre>
424+
<p>Or more completely, for evserver and curl, you might do:</p>
425+
<pre><code>sudo yum -y install -y libc -devel gcc libc6 -compat libcurl libcurl-devel libstdc++ libgcc glibc make gcc-c++</code></pre>
424426
<p>On some other machines that doesn't install library stuff and maybe you need</p>
425427
<pre><code>sudo apt-get install libcurl3 libcurl3-gnutls libcurl4-openssl-dev</code></pre>
426428
<p>System variables <code>%httpresponse</code> will hold the most recent http return code from calling <code>^jsonopen</code>.</p>

0 commit comments

Comments
 (0)
0