Chaz ist Chaz.
Dies ist ein Matrix -Bot, der sich mit mehreren LLM -Anbietern verbindet, um mit einem der LLM -Modelle zu chatten. Es ist mit jedem Modell mit der OpenAI -API kompatibel.
Darüber hinaus ist es auch möglich, Aichat als Anbieter zu verwenden, sodass auch auf Aichat verfügbare Modelle zugegriffen werden können.
Sie benötigen Ihre eigenen API -Schlüssel oder Ihre eigene lokale KI bereits konfiguriert.
Ankündigungsblog-Beitrag: Chaz: An LLM <--> Matrix-Chatbot
Es gibt einen öffentlichen Matrixraum bei #chaz: jackson.dev
Wenn Sie Ihre eigenen API -Schlüssel haben und mir vertrauen, dass ich sie nicht missbrauchen kann, können Sie schnell mit @chaz: jackson.dev beginnen. Fügen Sie diesen Matrix -Benutzer einfach in Ihrem Zimmer hinzu, konfigurieren Sie ihn mit Ihren eigenen API -Schlüssel zu einem OpenAI -API -kompatiblen Backend, und Sie können loslegen.
Chaz akzeptiert automatisch Raumeinladungen für jeden Benutzer in der allow_list .
Wenn es in einem Raum ist, wird es nach Befehlen beobachten, die von !chaz vorangestellt werden. Wenn es sich um eine DM handelt, wird auf jede Nachricht reagiert, die es nicht als Befehl erkennt. Wenn es sich in einem größeren Raum befindet, reagiert es nur auf Nachrichten, die mit !chaz an sie gesendet werden.
Senden Sie also in einem größeren Raum nur !chaz und es wird alle letzten Nachrichten im Raum gesendet und um eine Antwort gebeten. Sie können auch eine Anfrage zusammenstellen, z !chaz explain that to me , und sie erhält Ihre Nachricht und den Kontext des Raums und antwortet.
Die Befehle, die es erkennt, sind:
!chaz help
Available commands:
!chaz print - Print the conversation
!chaz send < message > - Send a message without context
!chaz model < model > - Select the model to use
!chaz backend < name > <api_base> <api_key> - Manually enter an OpenAI Compatible Backend
!chaz role [ < role > ] [ < prompt > ] - Get the role info, set the role, or define a new role
!chaz list - List available models
!chaz clear - Ignore all messages before this point
!chaz rename - Rename the room and set the topic based on the chat content
!chaz help - Show this message Der Befehl !chaz role nimmt 0, 1 oder viele Argumente.
!chaz role , um die aktuelle Rolle zu zeigen und alle verfügbaren Rollen aufzulisten.!chaz role <name> , um eine vorhandene Rolle als Standardeinstellung festzulegen.!chaz role <name> <prompt> um eine neue Rolle mit der angegebenen Eingabeaufforderung zu erstellen. chaz ist nur auf Kisten verpackt.
Für NIX -Benutzer enthält dieses Repo eine Nix -Flake. Weitere Informationen zum Konfigurieren finden Sie im Abschnitt "Setup".
Auf Docker Hub ist ein Docker -Image verfügbar. Hier ist ein Docker -Komponierungsbeispiel:
services :
chaz :
image : arcuru/chaz:main # Set to your desired version
restart : unless-stopped
network_mode : host
volumes :
# Mount your config file to /config.yaml
- ./config.yaml:/config.yaml
# Mount your aichat config to /aichat, AND SET THAT LOCATION IN CHAZ'S CONFIG.YAML
- aichat-state:/aichat
- ./aichat.yaml:/aichat/config.yaml
# Mount the volume into the same location specified in config.yaml
- chaz-state:/state
volumes :
# Persists the logged in session
chaz-state :
aichat-state :Beachten Sie, dass 2 Konfigurationsdateien erforderlich sind, um in den Container zu montieren, einen für Chaz und eine für Aichat. Sie müssen auch die Status-/Cache -Verzeichnisse in Ihrer CHAZ -Konfigurationsdatei festlegen.
Die Chaz -Konfigurationsdatei sollte ungefähr so aussehen:
homeserver_url : https://matrix.jackson.dev
username : " chaz "
password : " "
state_dir : " /state "
aichat_config_dir : " /aichat "
allow_list : " @.*:jackson.dev|@arcuru:matrix.org " Richten Sie zunächst ein Konto auf jedem Matrix -Server ein, damit der BOT verwendet werden kann.
Erstellen Sie eine Konfigurationsdatei für den Bot mit seinen Anmeldeinformationen.
WICHTIG : Stellen Sie sicher, dass Sie Ihre Zulassung einrichten oder der Bot nicht antwortet
Die Standardeinstellungen sind in SRC/Standards.Rs konfiguriert
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.
# message_limit: 0 # Set a per-account message limit, it will not allow more than this many messages per account.
# room_size_limit: 0 # Set a room size limit. It will refuse join if the room is too large.
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
disable_media_context : false # Optional, set to true to disable sending media context to aichat
role : chaz # Optionally set a role, AKA system prompt. Set to `chaz` for the full chaz experience, or `cave-chaz` for even more chaz
# Define backends. If more than 1 is defined, model names will be prefixed by the backends name.
# If none are defined, Chaz will look for Aichat
backends :
- name : openai # Name of the backend, models will be shown with this as a prefix, e.g. openai:gpt-4
type : openaicompatible
api_key :
api_base : https://api.openai.com/v1
models : # Listing models here is not necessary, but does make Chaz aware of them. You can still switch to a model not listed here through '!chaz model ....'
- name : gpt-4o
- name : gpt-4o-mini
- name : tog # Name can be anything. Model names will be "tog:<model>"
type : openaicompatible
api_key :
api_base : https://api.together.xyz/v1
- name : aic
type : aichat
roles : # Optional, define your own roles
- name : chaz # This one is predefined
description : Chaz is Chaz
prompt : " Your name is Chaz, you are an AI assistant, and you refer to yourself in the third person. "
example : # Optionally define example messages.
- user : User
message : " Are you ready? "
- user : Assistant
message : " Chaz is ready. "
- name : bash
description : Get a single shell command
prompt : >
Based on the following user description, generate a corresponding Bash shell command.
Focus solely on interpreting the requirements and translating them into a single, executable Bash command.
Ensure accuracy and relevance to the user's description.
The output should be a valid Bash command that directly aligns with the user's intent, ready for execution in a command-line environment.
Do not output anything except for the command.
No code block, no English explanation, no newlines, and no start/end tags. Um es auszuführen, einfach:
chaz --config config.yaml an.Der Bot wird nicht auf ältere Nachrichten antworten, die nicht ausgeführt wurden, während er nicht lief, um das Backend zu überwältigen.
Die Entwicklung wird mit einem Nix -Flocken durchgeführt. Der einfachste Weg, Chaz zu installieren, besteht darin, Nix Flocken zu verwenden.
❯ nix run github:arcuru/chazDie Flake enthält eine Overlay, um es einfacher zu machen, in Ihre eigene Flockenkonfiguration zu importieren. Fügen Sie es zu Ihren Eingängen hinzu:
inputs . chaz . url = "github:arcuru/chaz" ; Fügen Sie dann die Overlay inputs.chaz.overlays.default zu Ihren PKGs hinzu.
Die Flake enthält auch ein Heim-Manager-Modul zur Installation von Chaz als Service. Importieren Sie das Modul in Ihre Home-Manager-Konfiguration und Sie können chaz alle innerhalb von Nix konfigurieren:
{ 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" ;
} ;
} ;
} Spiegelt auf Github und Codeberg. Github ist das offizielle Repo, aber verwenden Sie eines der beiden Repo, um einen Beitrag zu leisten. Probleme können nicht synchronisiert werden, sodass es möglicherweise einige Duplikate geben.