1 unstable release
0.1.0 | Sep 24, 2024 |
---|
#464 in Web programming
31KB
544 lines
jutella-xmpp
XMPP – OpenAI API bridge based on tokio-xmpp and jutella.
Supports OpenAI and Azure endpoints and implements rolling context window to reduce costs.
Installation
Install the executable
- Install
cargo
from https://rustup.rs/. - Install
jutella-xmpp
from crates.io withcargo install jutella-xmpp
.
The executable will be installed as$HOME/.cargo/bin/jutellaxmpp
. - Alternatively, clone the repo and build the executable with
cargo build --release
. The resulting executable will betarget/release/jutellaxmpp
. - Copy the executable to
/usr/local/bin
.
Create a user for runnig the daemon
sudo useradd --system --shell /sbin/nologin --home-dir /nonexistent jutella
Install the config
- Copy the config example to
/etc
. - Make it accessible by root only:
sudo chmod 600 /etc/jutellaxmpp.toml
. - Edit the config to match your configuration.
- Make the config readable by user
jutella
:sudo setfacl -m user:jutella:r /etc/jutellaxmpp.toml
. - You will need to repeat step 4 after every edit if using
vim
, as it does not preserve ACL.
Install the systemd service
- Copy systemd service to
/etc/systemd/system
. - Enable it to run on system startup:
sudo systemctl enable jutellaxmpp.service
. - Start the service:
sudo systemctl start jutellaxmpp.service
.
Dependencies
~37–53MB
~821K SLoC