Skip to content

Latest commit

 

History

History
 
 

eg

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Examples

These directories include example snippets for how to do various things with RiveScript-js.

RiveScript Example

  • brain - The standard default RiveScript brain (.rive files) that implements an Eliza-like bot with added triggers to demonstrate other features of RiveScript.

Client Examples

  • web-client - Demonstrates embedding a RiveScript bot into a web page (i.e. to be served through a web server like Apache or nginx).
  • json-server - A minimal ExpressJS web server that makes a RiveScript bot available at a JSON POST endpoint.
  • telnet-server - A simple telnet server that listens on port 2001 and chats with connected users. It's like the shell.js except over a TCP socket.
  • slack-bot - Example of connecting a RiveScript bot to the Slack chat platform.

Code Snippets

  • persistence - Demonstrates persistence for user variables; the bot can be shut down and restarted and it can remember where it left off with its users.
  • async-object - Demonstrates a JavaScript object macro in RiveScript that asynchronously sends the user a second message at some point in the future, asynchronously from the immediately requested message.
  • scope - Demonstrates the usage of the scope parameter to the reply() function for passing the parent scope down into JavaScript object macros.