vulcan/rivescript

This package is abandoned and no longer maintained. The author suggests using the axiom/rivescript package instead.

RiveScript interpreter library for PHP with Laravel support. RiveScript is a scripting language for chatterbots, making it easy to write trigger/response pairs for building up a bot's intelligence.

v0.3.0 2019-02-23 07:10 UTC

This package is auto-updated.

Last update: 2022-02-02 21:23:04 UTC


README

Source License Build & Unit Test Phpcs Scrutinizer Code Quality

This is a RiveScript interpreter library for PHP. RiveScript is a simple scripting language for chatbots with a friendly, easy to learn syntax.

The package follows the FIG standards PSR-1, PSR-2, and PSR-4 to ensure a high level of interoperability between shared PHP code.

Documentation

Module documentation is available at http://rivescript.readthedocs.org/

Also check out the RiveScript Community Wiki for common design patterns and tips & tricks for RiveScript.

Installation

Simply install the package through Composer.

composer require axiom/rivescript

Integration

The RiveScript PHP interpreter is framework agnostic. As such, the interpreter can be used as is with native PHP, or with your favorite framework.

example.rive


+ hello bot
- Hello Human

require 'vendor/autoload.php';
use \Axiom\Rivescript\Rivescript;

$message = 'hello bot';
$rivescript = new Rivescript();
$rivescript->load('example.rive');

echo $rivescript->reply($message);

Output

Hello Human

Contributors

The Rivescript community is thankful for those who contributed to the project. Some of the people featured below contributed code or suggested tweaks to the package. Once again thanks, we could not have done it without you.

68747470733a2f2f636f6e747269622e726f636b732f696d6167653f7265706f3d6178696f6d2d6c6162732f726976657363726970742d706870

For more information checkout the authors page.

Important: Working Draft

The RiveScript Working Draft (WD) is a document that defines the standards for how RiveScript should work, from an implementation-agnostic point of view. The Working Draft should be followed when contributing to the RiveScript-PHP interpreter. If any of the current implementations don't do what the Working Draft says they should, this is considered to be a bug and you can file a bug report or send a pull request.

You may find the latest version on the RiveScript website at http://www.rivescript.com/wd/RiveScript.

SEE ALSO

The official RiveScript website, http://www.rivescript.com/