
Security News
Official Go SDK for MCP in Development, Stable Release Expected in August
The official Go SDK for the Model Context Protocol is in development, with a stable, production-ready release expected by August 2025.
chatbotbase
Advanced tools
A modular node.js framework to write chatbots for different platforms like Google Home and Amazon Alexa at once.
A modular node.js framework to write chatbots for different platforms like Google Home and Amazon Alexa at once.
In order to use this library you need to install the chatbotbase
module and of cause the platforms you want to support.
Currently are the following platforms supported:
chatbotbase-dialogflowplatform
chatbotbase-alexaplatform
If you want to support both platforms use this commands:
npm init
npm install chatbotbase chatbotbase-dialogflowplatform chatbotbase-alexaplatform
The next Step is to write your own chatbot by extending the VoiceAssistant
class. The most important methods are:
loadPlatforms()
, there you define the platforms you actually want to supportreply()
where you get the input from the user and you return your answerloadTranslations()
where you define your translationsloadTracker()
if you want to track the input of the user e.g. with chatbaseHere is the full TypeScript code to write a skill/action supporting Alexa and the Google Assistant. This example welcomes you with a random phrase and gives the user the suggestion to say bye (on supported platforms here just Google Assistant). This example supports multiple languages here German and English.
import {Input, Output, VoiceAssistant, VoicePlatform, Translations} from 'chatbotbase';
import {Dialogflow} from 'chatbotbase-dialogflowplatform';
import {Alexa} from 'chatbotbase-alexaplatform';
export class MyChatBot extends VoiceAssistant {
loadPlatforms(): VoicePlatform[] {
return [new Dialogflow(), new Alexa()];
}
reply(input: Input): Output {
const reply = input.reply();
switch(input.intent) {
case 'LaunchRequest':
case 'Default Welcome Intent':
reply.addReply(this.plainReply(this.t('WELCOME')));
reply.addSuggestion(this.suggestion(this.t('BYE')));
reply.setExpectAnswer(true);
break;
case 'Exit':
case 'SessionEndedRequest':
reply.addReply(this.plainReply(this.t('STOP_MESSAGE')));
break;
}
return reply;
}
loadTranslations(): Translations {
return {
'de': {
WELCOME: ['Hi', 'Hallo'],
STOP_MESSAGE: ['Aufwiedersehen!', 'Bis bald.'],
BYE: 'Tschüss'
},
'en': {
WELCOME: ['Hi', 'Hello'],
STOP_MESSAGE: ['Good bye!', 'See you soon.'],
BYE: 'Bye'
}
};
}
}
The ChatbotBase also allows you to track the input of the user e.g. with chatbase. To use just just import the
chatbaseplugin and overwrite the loadTracker()
method like this:
loadTracker(): TrackingProvider[] {
return [new Chatbase('<your-api-key>', '<your-app-version>')];
}
Currently there are implementation the following tracker:
FAQs
A modular node.js framework to write chatbots for different platforms like Google Home and Amazon Alexa at once.
We found that chatbotbase demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
The official Go SDK for the Model Context Protocol is in development, with a stable, production-ready release expected by August 2025.
Security News
New research reveals that LLMs often fake understanding, passing benchmarks but failing to apply concepts or stay internally consistent.
Security News
Django has updated its security policies to reject AI-generated vulnerability reports that include fabricated or unverifiable content.