Package Exports
- smart-assistant
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (smart-assistant) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Smart assistant
You can use this module for create assistants, chatassistants, etc.
Install
npm install --save smart-assistant
Or
yarn add --save smart-assistant
Usage
const SmartAssistant = require('smart-assistant');
const assistant = new SmartAssistant(
['pt', 'en'] // List of supported languages
);
(async () => {
await assistant.train(
'./model.nlp',// Path to the model, default: ./model.nlp
'./mind/documents.txt', // Path to the documents, default: ./mind/documents.txt
'./mind/answers.txt' // Path to the answers, default: ./mind/answers.txt
);
assistant.say('Trained');
assistant.onConsole(); // Start the console
// Or
const answer = assistant.answer('How are you?'); // Answer to a question
})();