botiverse is a chatbot library that offers a high-level API to access a diverse set of chatbot models
Project description
Botiverse is Python package that bridges the gap between developers regardless of their machine learning expertise and building chatbots. It offers a diverse set of modern chatbot architectures that are ready to be trained in a high-level fashion while offering optional fine-grained control for advanced use-cases.
Check this for the documentation.
🚀 Installation
For standard use, consider
pip install botiverse
This installs botiverse excluding the dependencies needed for the voice bot and its preprocessors. To include those as well, consider installing
pip install botiverse[voice]
and make sure to also have FFMPEG on your machine, as needed by the unavoidable dependency PyAudio
.
🏮 Basic Demo
Import the chatbot you need from botiverse.bots
. All bots have a similar interface consisting of a read, train and infer method.
from botiverse.bots import BasicBot
# make a chatbot instance
bot = BasicBot(machine='nn', repr='tf-idf')
# read the data
bot.read_data('dataset.json')
# train the chatbot
bot.train()
# infer
bot.infer("Hello there!")
💥 Supported Chatbots
Botiverse offers 7 main chatbot architectures that cover a wide variety of use cases:
Chatbot | Description | Example Use Case |
---|---|---|
Basic Bot | A light-weight intent-based chatbot based on classical or deep classiciation models | Answer frequently asked questions on a website while remaining insensitive to wording |
Whiz Bot | A multi-lingual intent-based chatbot based on deep sequential models | Similar to basic bot but suitable for cases where there is more data or better performance or multilinguality is needed in return of more computation |
Task Bot | A task-oriented chatbot based on encoder transformer models | A chatbot that can collect all the needed information to perform a task such as booking a flight or a hotel |
Basic Task Bot | A basic light-weight version of the task bot purely based on Regex and grammars | When insufficient data exists for the deep version and developers are willing to design a general grammar for the task |
Converse Bot | A conversational chatbot based on language modeling with transformers | A chatbot that converses similar to human agents; e.g., like a narrow version of ChatGPT as customer service |
Voice Bot | A voice bot that simulates a call state machine based on deep speech and embedding models | A voice bot that collects important information from callers before transferring them to a real agent |
Theorizer | Based on deep classification and language models | Converts textual data into question-answer pairs suitable for later training |
💥 Supported Preprocessors and Models
- All chatbot architectures that Botiverse support (i.e., in
botiverse.bots
) are composed of a representer that puts the input text or audio in the right representation and a model that is responsible for the model's output. - All representers (top row) and models (bottom row) with a non-white frame were implemented from scratch for some definition of that.
- Beyond being a chatbot package, most representers and models can be also used independently and share the same API. For instance, you can import your favorite model or representer from
botiverse.models
orbotiverse.preprocessors
respectively and use it for any task. - Some chatbot architectures also allows using a customly defined representer or model as long as it satisfies the relevant interface.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for botiverse-0.5.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2b1298b3c32e78c5c807a5ebdc52cf77bb0ccb76b3f146b41bf50ccc3e2f7561 |
|
MD5 | 832c89266ffc3fbd691f61a94a56dd65 |
|
BLAKE2b-256 | 11299413ba2b2eb64b4067b32cded7b0b50bd9203b619c4bca7397c5d6426e29 |