Crates.io | chaz |
lib.rs | chaz |
version | 0.2.0 |
source | src |
created_at | 2024-04-07 14:03:26.60204 |
updated_at | 2024-04-07 14:03:26.60204 |
description | chaz |
homepage | https://github.com/arcuru/chaz |
repository | https://github.com/arcuru/chaz |
max_upload_size | |
id | 1199179 |
size | 127,546 |
Chaz is chaz.
This is a Matrix bot that connects to AIChat to provide access to "10+ AI platforms, including OpenAI, Gemini, Claude, Mistral, LocalAI, Ollama, VertexAI, Ernie, Qianwen..." all from within Matrix.
You do NOT need to be running your own Matrix homeserver to use this. It is a bot that should be usable with any homeserver, you'll just need to create an account for it.
You will need your own API keys or your own local AI already configured.
chaz
is only packaged on crates.io, but it's recommended that you run from git HEAD for now.
For Nix users, this repo contains a Nix flake. See the setup section for details on configuring.
First, setup an account on any Matrix server for the bot to use.
Create a config file for the bot with its login info.
IMPORTANT: Make sure that you setup your allow_list or the bot will not respond
homeserver_url: https://matrix.org
username: "chaz"
password: "" # Optional, if not given it will ask for it on first run
allow_list: "" # Regex for allowed accounts.
state_dir: "$XDG_STATE_HOME/chaz" # Optional, for setting the chaz state directory
aichat_config_dir: "$AICHAT_CONFIG_DIR" # Optional, for using a separate aichat config
chat_summary_model: "" # Optional, set a different model than the default to use for summarizing the chat
Development is being done using a Nix flake. The easiest way to install chaz is to use nix flakes.
❯ nix run github:arcuru/chaz
The flake contains an overlay to make it easier to import into your own flake config. To use, add it to your inputs:
inputs.chaz.url = "github:arcuru/chaz";
And then add the overlay inputs.chaz.overlays.default
to your pkgs.
The flake also contains a home-manager module for installing chaz as a service.
Import the module into your home-manager config and you can configure chaz
all from within nix:
{inputs, ... }: {
imports = [ inputs.chaz.homeManagerModules.default ];
services.chaz = {
enable = true;
settings = {
homeserver_url = "https://matrix.jackson.dev";
username = "chaz";
password = "hunter2";
allow_list = "@me:matrix.org|@myfriend:matrix.org";
};
};
}
To run it, simply:
chaz --config config.yaml
.The bot will not respond to older messages sent while it wasn't running to prevent overwhelming the backend.