mindscript
v1.0.0
Published
A simple and lightweight library for making AI-Based chatbots.
Downloads
10
Maintainers
Readme
Mindscript
The Mindscript library provides an AI-based, lightweight solution for creating chatbot-like interactions. It's designed to be easy to train, making it a great choice for various conversational applications.
Installation
Install the mindscript
library using npm:
npm install mindscript
Usage
- Create a model JSON file with questions and responses. For example,
model.json
:
[
{
"id": 1,
"question": ["hi"],
"response": ["Hello!"]
},
{
"id": 2,
"question": ["how", "are", "you"],
"response": ["I'm fine, thank you!"]
}
]
- Use the
Mind
class from the library to generate responses:
const Mind = require('mindscript');
const mind = new Mind('./path-to-your-model/model.json');
let input = 'Hi';
console.log(mind.think(input)); // Output: "Hello!"
Benefits
- AI-Based: Leverage AI-powered interactions for your applications.
- Easy Training: Create models quickly and efficiently with predefined questions and responses.
- Lightweight: Built using native Node.js, the library doesn't require excessive resources.
- Customizable: Tailor the models to suit your specific needs and conversations.