A broker for routing tasks to different services
Project description
BrokerIO
This package contains BrokerIO, originally built for CARE, but more and more used standalone. BrokerIO allows running multiple models in parallel and to distribute skill requests via websockets. We currently support several skills out of the box:
- OpenAI Azure API
- Huggingface Pipeline
- Llama.cpp through Python bindings
- NLTK Vader Sentiment Analysis
The original repository can be found here. We provide a documentation of BrokerIO here.
Requirements
Quickstart
Simple run pip install brokerio to install the package and find out more about it with brokerio --help.
brokerio broker start --db_url "http://localhost:8529" --redis_url "redis://localhost:6379" --port 4852
or directly build brokerIO as a service with docker compose (all required databases included):
docker compose -f docker-compose.yml -p "brokerio" up --build -d
Backup and Export of the Database
To backup the broker ArangoDB execute the following commands in the project directory
mkdir -p db_dumps
docker exec brokerio-arangodb-1 sh -c 'arangodump --output-directory /tmp/dump > /dev/null && tar -cz -C /tmp/dump . && rm -rf /tmp/dump' > db_dumps/dump_$(date +%d-%m-%Y_%H_%M_%S).tar.gz
This will create a tar file from the dump directory that ArangoDB creates To import a previously created dump, use the following command:
cat db_dumps/dump_filename.tar.gz | docker exec -i brokerio-arangodb-1 sh -c 'mkdir -p /tmp/restore && tar -xz -C /tmp/restore && arangorestore --input-directory /tmp/restore --overwrite true && rm -rf /tmp/restore'
To export collections from the ArangoDB as JSONL format run:
mkdir -p db_dumps
docker exec brokerio-arangodb-1 sh -c 'arangoexport --type jsonl --collection clients --collection roles --collection skills --collection tasks --collection users --output-directory /tmp/full_export > /dev/null && tar -cz -C /tmp/full_export . && rm -rf /tmp/full_export' > db_dumps/full_jsonl_$(date +%Y-%m-%d).tar.gz
This will create a tar file with a single JSONL file for each collection. Remove the --collection ... parameter of the collections you want to exclude from the export.
Features
BrokerIO provides a set of features to manage and distribute requests to multiple Skills:
- Quota System: Limit the number of requests a client can make
- NoSQL Database: Store the results of the Skills in a NoSQL database (inclusive donation feature)
- Authentication: Secure the access to the BrokerIO API via Role based access control (RBAC)
- CLI: Manage the BrokerIO and the available Skills via the command line
- Logging: Log all requests and responses to the BrokerIO API
- Build-in Skills: Provide a set of build-in Skills to get started
- Docker Environment: Run the BrokerIO in a Docker container
Contact
Maintainers:
- Dennis Zyska (dennis.zyska@tu-darmstadt.de)
Contributors:
- Nils Dycke (nils.dycke@tu-darmstadt.de)
Don't hesitate to send us an e-mail or report an issue, if something is broken (and it shouldn't be) or if you have further questions.
https://www.ukp.tu-darmstadt.de
https://www.tu-darmstadt.de
Citation
If you use this software, please cite the following paper:
@inproceedings{zyska-etal-2023-care,
title = "{CARE}: Collaborative {AI}-Assisted Reading Environment",
author = "Zyska, Dennis and
Dycke, Nils and
Buchmann, Jan and
Kuznetsov, Ilia and
Gurevych, Iryna",
booktitle = "Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 3: System Demonstrations)",
month = jul,
year = "2023",
address = "Toronto, Canada",
publisher = "Association for Computational Linguistics",
url = "https://aclanthology.org/2023.acl-demo.28",
doi = "10.18653/v1/2023.acl-demo.28",
pages = "291--303",
abstract = "Recent years have seen impressive progress in AI-assisted writing, yet the developments in AI-assisted reading are lacking. We propose inline commentary as a natural vehicle for AI-based reading assistance, and present CARE: the first open integrated platform for the study of inline commentary and reading. CARE facilitates data collection for inline commentaries in a commonplace collaborative reading environment, and provides a framework for enhancing reading with NLP-based assistance, such as text classification, generation or question answering. The extensible behavioral logging allows unique insights into the reading and commenting behavior, and flexible configuration makes the platform easy to deploy in new scenarios. To evaluate CARE in action, we apply the platform in a user study dedicated to scholarly peer review. CARE facilitates the data collection and study of inline commentary in NLP, extrinsic evaluation of NLP assistance, and application prototyping. We invite the community to explore and build upon the open source implementation of CARE.Github Repository: \url{https://github.com/UKPLab/CAREPublic} Live Demo: \url{https://care.ukp.informatik.tu-darmstadt.de}",
}
Disclaimer
This repository contains experimental software and is published for the sole purpose of giving additional background
details on the respective publication.
The software is only tested on unix systems and is not guaranteed to work on other operating systems.
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file brokerio-0.5.1.tar.gz.
File metadata
- Download URL: brokerio-0.5.1.tar.gz
- Upload date:
- Size: 50.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
30ba35ca8dc7de9966ae396bff65118f3d25e83962bae190a689ac33ffd83a9b
|
|
| MD5 |
e5c7ea2daf9aad7b61a88c525f750b5e
|
|
| BLAKE2b-256 |
5ba0cd94cc0358ff984fa17f2f4db2b4a811d5bafb055bf974220f1a704b0a84
|
Provenance
The following attestation bundles were made for brokerio-0.5.1.tar.gz:
Publisher:
publish-to-pypi.yml on UKPLab/BrokerIO
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
brokerio-0.5.1.tar.gz -
Subject digest:
30ba35ca8dc7de9966ae396bff65118f3d25e83962bae190a689ac33ffd83a9b - Sigstore transparency entry: 798273320
- Sigstore integration time:
-
Permalink:
UKPLab/BrokerIO@50638fc4df33900f35fd2c2a35d9cf03715c0819 -
Branch / Tag:
refs/tags/0.5.1 - Owner: https://github.com/UKPLab
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@50638fc4df33900f35fd2c2a35d9cf03715c0819 -
Trigger Event:
release
-
Statement type:
File details
Details for the file brokerio-0.5.1-py3-none-any.whl.
File metadata
- Download URL: brokerio-0.5.1-py3-none-any.whl
- Upload date:
- Size: 71.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f45d1272739fedb42b4bef51b68b0dce3699909c77318b9d373c70dab18b34a5
|
|
| MD5 |
7acc2cf69dca0c1feaaf12fd2659f71f
|
|
| BLAKE2b-256 |
5ff414454d9fd17165f1b152acf40be4dc2930b5ef9d1e350e0cd8d1874e4abf
|
Provenance
The following attestation bundles were made for brokerio-0.5.1-py3-none-any.whl:
Publisher:
publish-to-pypi.yml on UKPLab/BrokerIO
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
brokerio-0.5.1-py3-none-any.whl -
Subject digest:
f45d1272739fedb42b4bef51b68b0dce3699909c77318b9d373c70dab18b34a5 - Sigstore transparency entry: 798273325
- Sigstore integration time:
-
Permalink:
UKPLab/BrokerIO@50638fc4df33900f35fd2c2a35d9cf03715c0819 -
Branch / Tag:
refs/tags/0.5.1 - Owner: https://github.com/UKPLab
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@50638fc4df33900f35fd2c2a35d9cf03715c0819 -
Trigger Event:
release
-
Statement type: