Chaz es Chaz.
Este es un bot de matriz que se conecta a múltiples proveedores de LLM para permitir chatear con cualquiera de los modelos LLM. Es compatible con cualquier modelo que use la API de OpenAI.
Además, también es posible utilizar Aichat como proveedor, por lo que también se puede acceder a cualquier modelo disponible a través de AICHAT.
Necesitará sus propias claves API o su propia IA local ya configurada.
Publicación del blog del anuncio: Chaz: An LLM <-> Matrix Chatbot
Hay una sala de matriz pública disponible en #Chaz: Jackson.dev
Si tiene sus propias claves API y confía en mí para no abusar de ellas, puede comenzar rápidamente con @Chaz: Jackson.dev. Simplemente agregue ese usuario de matriz a su habitación, configúrelo con sus propias claves API para un backend compatible con API de OpenAI, y está listo para comenzar.
Chaz aceptará automáticamente invitaciones de habitación para cualquier usuario en la allow_list .
Cuando esté en una habitación, observará los comandos que están prefijados por !chaz . Si es un DM, responderá a cada mensaje que no reconoce como un comando. Si está en una habitación más grande, solo responderá a los mensajes que se envían a él !chaz
Entonces, en una habitación más grande, envíe justo !chaz y se enviará todos los mensajes recientes en la habitación y se le solicitará una respuesta. También puede enviar una solicitud junto con eso, por ejemplo !chaz explain that to me , y recibirá su mensaje y el contexto de la habitación y responderá.
Los comandos que reconoce son:
!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 El comando !chaz role toma 0, 1 o muchos argumentos.
!chaz role para mostrar el rol actual y enumerar todos los roles disponibles.!chaz role <name> para establecer un rol existente como el valor predeterminado.!chaz role <name> <prompt> para crear un nuevo rol con el aviso dado. chaz solo está empaquetado en cajas.io, pero se recomienda que huya de Git Head por ahora.
Para los usuarios de NIX, este repositorio contiene un flake Nix. Consulte la sección Configuración para obtener detalles sobre la configuración.
Hay una imagen Docker disponible en Docker Hub. Aquí hay un ejemplo de composición de Docker:
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 :Tenga en cuenta que esto requiere 2 archivos de configuración para montar en el contenedor, uno para Chaz y otro para AICHAT. También deberá establecer los directorios de estado/caché en su archivo de configuración Chaz.
El archivo de configuración de Chaz debería verse algo así:
homeserver_url : https://matrix.jackson.dev
username : " chaz "
password : " "
state_dir : " /state "
aichat_config_dir : " /aichat "
allow_list : " @.*:jackson.dev|@arcuru:matrix.org " Primero, configure una cuenta en cualquier servidor de matriz para que el bot.
Cree un archivo de configuración para el bot con su información de inicio de sesión.
IMPORTANTE : Asegúrese de configurar su TInsion_List o el bot no responderá
Los valores predeterminados están configurados en src/defaults.rs
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. Para ejecutarlo, simplemente:
chaz --config config.yaml .El bot no responderá a los mensajes más antiguos enviados mientras no se estaba ejecutando para evitar abrumador el backend.
El desarrollo se realiza utilizando un escama nix. La forma más fácil de instalar Chaz es usar Nix Flakes.
❯ nix run github:arcuru/chazEl copo contiene una superposición para facilitar la importación de su propia configuración de escamas. Para usarlo, agrégalo a sus entradas:
inputs . chaz . url = "github:arcuru/chaz" ; Y luego agregue las inputs.chaz.overlays.default superposición.chaz.overlays.default a sus PKG.
El copo también contiene un módulo de manager de origen para instalar Chaz como servicio. Importe el módulo en su configuración de Home-Manager y puede configurar chaz todo desde 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" ;
} ;
} ;
} Reflejado en GitHub y CodeBerg. Github es el repositorio oficial, pero usa cualquier repositorio para contribuir. Los problemas no se pueden sincronizar, por lo que puede haber algunos duplicados.