The RiveScript Web Editor ("Try RiveScript Online") is provided as a convenience
for new users as they learn to code RiveScript. It provides an interface for
typing (or copying/pasting) RiveScript code and then executing and testing it
by chatting with the bot you've created, directly on the web!
The web editor requires a relatively recent browser with JavaScript and ajax
support. So, any version of Internet Explorer after 6.0, Firefox, Chrome,
Safari, etc. are probably good bets.
It also requires an Internet connection; you can't save the web editor for
offline use, due to the nature of how it works.
How to Use
On the main window of the web editor there is a text area where you can type
(or copy/paste) RiveScript code into. For convenience, there is also a
drop-down list of existing templates -- these are pre-generated
RiveScript documents. Selecting one will put its contents into the text area
for you to see or modify. rs-standard.rs is a single
file that contains the standard RiveScript brain -- the one that comes with
the Perl RiveScript module. This brain, based on Eliza, is fairly simplistic
but fully functional.
After writing your code, click on the
button. This will upload your code to the server and display a window that
you can use to chat with your bot. This window acts like a typical Instant
Messenger window: type your message into the "Send Message" box and hit
Return when done. Your message will be sent to the server, and your RiveScript
bot will send a response back. Hopefully. If not there was probably an error.
Terms of Use
The RiveScript Web Editor is available as a convenience for new users learning
RiveScript. Having said that, the following rules should be followed:
Only type RiveScript code. Don't paste HTML, CSS, or any other
type of text data. This will only lead to severe syntax errors.
Be reasonable in the amount of data you upload. There is a hard
limit set at 1 MB but through normal use you shouldn't have to reach
that limit. Your browser is likely to crash before you reach this
limit.
Don't abuse the back-end code by using third-party applications.
Only use the web interface that's provided.
Server Errors
Certain safeguards are built into the server to prevent misuse of the
service. If any server errors are encountered, your session with the server
will be terminated and your editor window will be locked down and require
a reload. Server errors are usually a result of one of the following:
Severe syntax errors: these will occur if you try to upload code
that isn't RiveScript.
If your code takes more than 5 seconds to load or process: put in
perspective, a RiveScript version of
ALICE can reply in less than 1 second.
Through regular use, server errors shouldn't be encountered. If they are:
You will receive an alertbox telling you about the error.
Your session with the server will be terminated.
The server will log the details of the error, along with your IP
address, the code you uploaded, the message you sent (if applicable),
time of the error, and other such details.
The chat window will disappear and your editor window will be
disabled ("greyed-out").