
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Minimalistic chatbot framework for humans.
npm install symon
// English
import { Bot } from 'symon';
const bot = new Bot();
// Other languages may require a specific stemmer:
// https://naturalnode.github.io/natural/stemmers.html
import { Bot, PorterStemmerUk as stemmer } from 'symon';
const bot = new Bot({ stemmer });
bot.addDocument({
intent: 'chatter/greeting',
examples: ['hello', 'hi],
answers: ['Hello!'],
});
bot.addDocument({
intent: 'chatter/parting',
examples: ['goodbye', 'bye'],
answers: ['Bye!'],
});
bot.addEntity({
label: 'insult',
examples: ['stupid', 'silly'],
});
bot.addEntity({
label: 'praise',
examples: ['smart', 'sweet'],
});
bot.addDocument({
intent: 'chatter/insult',
examples: ['you are %insult%', '%insult%'],
answers: ['You make me sad...'],
});
bot.addDocument({
intent: 'chatter/praise',
examples: ['you are %praise%', '%insult%'],
answers: ['Thanks!'],
});
bot.addDocument({
intent: 'random',
examples: ['pick a random number', 'say a random number'],
handler: async (ctx) => {
const number = Math.floor(Math.random() * 5);
await ctx.say({ answer: number.toString() });
},
});
bot.addMiddleware(async (req, res) => {
if (!res.answer) {
res.answer = `Sorry, I don't understand you.`;
}
});
import { Shell } from 'symon';
const shell = new Shell({ bot });
shell.start();
Symon is licensed under the MIT license.
FAQs
Simple framework for building smart chatbots.
The npm package symon receives a total of 2 weekly downloads. As such, symon popularity was classified as not popular.
We found that symon demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.