A Java based framework for chatbots
The goal of this framework is to provide an api for writing vendor neutral conversational (chat and voice) systems and bots. Support for massaging frameworks and intent recognition are provided by plugins. The goal is to provide implementations for all major frameworks and apis to allow writing cross vendor and platform neutral bots.
This project still in alpha state so expect api changes.
Bottery is licensed under the Apache License v2
See the support matrix for more details
There is also a basic changelog and a list of planned changes and features for more details
There is a number of examples in the examples package however a very basic echo bot on the console takes no more than:
// create a UniversalBot
UniversalBot bot = new UniversalBot();
// set the welcome dialog
bot.setWelcomeDialog(new Utterance() {
// use the text of the incoming activity as the answer for the response
public IModel<String> getText(IActivity request, ISession session) {
return new Model<String>(request.getText());
}
});
}
// connect the bot to the console
new ConsoleConnector().register(bot);
}
There are more examples in a seperate subproject bottery.examples
The basic concepts of the framework are
All components except the session are designed to be stateless so instances can be resused among a number of chat sessions. All data related to the individual chat must be stored in the session.
Bottery borrows some of its concepts from the apache wicket web framework.
I looked into chatbots and ai for quite some time (among other reasons for some ideas i had for openhab see sylvani) and i realized that whatever api or framework i used, i always ended up writing the evaluation business logic (turn my hue on and off) again. So i started to create an abstraction layer.
The original implementation was part of an effort to bring voice and text assistants to openhab and eclipse smarthome. Some of the concepts for voice made it into the eclipse smarthome core and the rest eventually evolved into this framework.
The name is a combination of the words bot, battery and potter, make of it what you want :)