@agentic-profile/eliza
v0.1.0
Published
Typescript implementation of Eliza, the classic chatbot
Readme
Typescript implementation of the classic Eliza chatbot
This code is derived from several sources:
- [Oren's eliza-bot](https://github.com/oren/eliza-bot/blob/master/elizabot.js)
- [Brandon Wong's elizabot](https://github.com/brandongmwong/elizabot-js)
- [N. Landsteiner](https://www.masswerk.at/elizabot/)Background
ELIZA is an early natural language processing computer program created from 1964 to 1966 at the MIT Artificial Intelligence Laboratory by Joseph Weizenbaum. Created to demonstrate the superficiality of communication between man and machine, Eliza simulated conversation by using a 'pattern matching' and substitution methodology that gave users an illusion of understanding on the part of the program, but had no built in framework for contextualizing events. Directives on how to interact were provided by 'scripts', written originally in MAD-Slip, which allowed ELIZA to process user inputs and engage in discourse following the rules and directions of the script. The most famous script, DOCTOR, simulated a Rogerian psychotherapist and used rules, dictated in the script, to respond with non-directional questions to user inputs. As such, ELIZA was one of the first chatterbots, but was also regarded as one of the first programs capable of passing the Turing Test.
More information on Wikipedia
Usage
```import { ElizaBot } from "@agentic-profile/eliza";
const eliza = new ElizaBot( true ); // noRandom=true for testing
console.log( "Eliza: " + eliza.getInitial() );
console.log( "Patient: " + eliza.transform( "I'm not sleeping well" ) );
```