These directories include example snippets for how to do various things with RiveScript-Python.
- brain - The standard default RiveScript brain (
.rivefiles) that implements an Eliza-like bot with added triggers to demonstrate other features of RiveScript.
- json-server - A minimal Flask web server that makes a RiveScript bot available at a JSON POST endpoint.
- twilio - An example that uses the Twilio SMS API to create a bot that can receive SMS text messages from users and reply to them using RiveScript.
- sessions - Demonstrates replacing the default in-memory session storage with ones that support persistent back-end storage systems.
- parser - Use the
rivescript.parsermodule to parse RiveScript code yourself. - js-objects - Demonstrates adding JavaScript object macro
support to RiveScript-Python. This example assumes a Python RiveScript bot is
serving its responses via a web front-end, so that the JS macros are being
executed in the user's browser via
<script>tags. - perl-objects - Demonstrates adding Perl object macro support to RiveScript-Python. This works by running a Perl script, which uses the Perl version of RiveScript, and passing essential data about the object call into the Perl script and retrieving the output.