Chaz는 Chaz입니다.
이것은 LLM 모델과 채팅 할 수 있도록 여러 LLM 제공 업체에 연결하는 매트릭스 봇입니다. OpenAI API를 사용하는 모든 모델과 호환됩니다.
또한 AICHAT를 제공자로 사용할 수도 있으므로 AICHAT를 통해 사용할 수있는 모든 모델에도 액세스 할 수 있습니다.
자신의 API 키 또는 이미 구성된 로컬 AI가 필요합니다.
발표 블로그 게시물 : Chaz : A LLM <-> 매트릭스 챗봇
#chaz : jackson.dev에는 공개 매트릭스 룸이 있습니다
자신의 API 키가 있고 남용하지 말라고 믿는다면 @chaz : jackson.dev로 빨리 시작할 수 있습니다. 해당 매트릭스 사용자를 방에 추가하고 OpenAI API 호환 백엔드에 자신의 API 키로 구성하면 좋습니다.
Chaz는 allow_list 의 모든 사용자에 대한 객실 초대를 자동으로 허용합니다.
방에있을 때는 !chaz 접두사로 표시되는 명령을 지켜 볼 것입니다. DM 인 경우 명령으로 인식되지 않는 모든 메시지에 응답합니다. 더 큰 방에있는 경우 !chaz 사용하여 전송되는 메시지에만 응답합니다.
따라서 더 큰 방에서는 그냥 보내십시오 !chaz 는 객실에 최근의 모든 메시지를 보내고 응답을 요청합니다. 당신은 또한 요청과 함께 요청을 보낼 수 !chaz explain that to me .
그것이 인식하는 명령은 다음과 같습니다.
!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 !chaz role 명령은 0, 1 또는 많은 인수를 취합니다.
!chaz role 사용하십시오.!chaz role <name> 사용하십시오.!chaz role <name> <prompt> 사용하십시오. chaz 는 Crates.io에만 포장되어 있지만 지금은 Git Head에서 달리는 것이 좋습니다.
닉스 사용자의 경우이 리포지토리에는 닉스 플레이크가 포함되어 있습니다. 구성에 대한 자세한 내용은 설정 섹션을 참조하십시오.
Docker Hub에는 Docker 이미지가 있습니다. Docker Compose 예는 다음과 같습니다.
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 :이를 위해서는 2 개의 구성 파일이 컨테이너에 장착되어야하며, 하나는 chaz 및 aichat 용입니다. 또한 Chaz 구성 파일에서 상태/캐시 디렉토리를 설정해야합니다.
Chaz 구성 파일은 다음과 같습니다.
homeserver_url : https://matrix.jackson.dev
username : " chaz "
password : " "
state_dir : " /state "
aichat_config_dir : " /aichat "
allow_list : " @.*:jackson.dev|@arcuru:matrix.org " 먼저, 봇이 사용할 행렬 서버에서 계정을 설정하십시오.
로그인 정보가 포함 된 봇의 구성 파일을 만듭니다.
중요 : allow_list를 설정하는지 확인하십시오. 그렇지 않으면 봇이 응답하지 않습니다.
기본값은 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. 그것을 실행하려면 간단히 :
chaz --config config.yaml .봇은 백엔드를 압도하는 것을 방지하기 위해 실행되지 않은 상태에서 보낸 오래된 메시지에 응답하지 않습니다.
Nix 플레이크를 사용하여 개발이 수행되고 있습니다. Chaz를 설치하는 가장 쉬운 방법은 Nix 플레이크를 사용하는 것입니다.
❯ nix run github:arcuru/chaz플레이크에는 오버레이가 포함되어있어 자신의 플레이크 구성으로 쉽게 가져올 수 있습니다. 사용하려면 입력에 추가하십시오.
inputs . chaz . url = "github:arcuru/chaz" ; 그런 다음 오버레이 inputs.chaz.overlays.default PKG에 추가하십시오.
플레이크에는 또한 Chaz를 서비스로 설치하기위한 주택 관리자 모듈도 포함되어 있습니다. 모듈을 홈 관리자 구성으로 가져 오면 Nix 내에서 모두 chaz 구성 할 수 있습니다.
{ 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" ;
} ;
} ;
} Github와 Codeberg에 미러링되었습니다. Github는 공식 리포이지만 REPO를 사용하여 기여합니다. 문제를 동기화 할 수 없으므로 일부 중복이있을 수 있습니다.