تشاز هو تشاز.
هذا هو روبوت المصفوفة الذي يتصل بمقدمي LLM المتعددين للسماح بالدردشة مع أي من طرز LLM. وهو متوافق مع أي نموذج باستخدام API Openai.
بالإضافة إلى ذلك ، من الممكن أيضًا استخدام Aichat كمزود ، لذلك يمكن الوصول إلى أي نماذج متوفرة من خلال Aichat أيضًا.
ستحتاج إلى مفاتيح API الخاصة بك أو منظمة العفو الدولية المحلية التي تم تكوينها بالفعل.
منشور مدونة الإعلان: Chaz: LLM <-> Matrix chatbot
تتوفر غرفة مصفوفة عامة في #Chaz: Jackson.Dev
إذا كان لديك مفاتيح API الخاصة بك ، وكنت تثق بي في عدم إساءة استخدامها ، فيمكنك البدء بسرعة مع Chaz: Jackson.dev. ما عليك سوى إضافة مستخدم Matrix إلى غرفتك ، وتكوينه باستخدام مفاتيح API الخاصة بك إلى الواجهة الخلفية المتوافقة مع API Openai ، وأنت على ما يرام.
سوف تقبل 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 فقط على Catse.io ، ولكن يوصى بالركض من Git Head في الوقت الحالي.
بالنسبة لمستخدمي NIX ، يحتوي هذا الريبو على Nix Flake. راجع قسم الإعداد للحصول على تفاصيل حول التكوين.
هناك صورة Docker متوفرة على Docker Hub. إليك Docker Compense على سبيل المثال:
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 :لاحظ أن هذا يتطلب تثبيت ملفين للتكوين في الحاوية ، واحدة لـ Chaz وواحدة لـ Aichat. ستحتاج أيضًا إلى تعيين أدلة الحالة/ذاكرة التخزين المؤقت في ملف Config Chaz الخاص بك.
يجب أن يبدو ملف Config Chaz مثل هذا:
homeserver_url : https://matrix.jackson.dev
username : " chaz "
password : " "
state_dir : " /state "
aichat_config_dir : " /aichat "
allow_list : " @.*:jackson.dev|@arcuru:matrix.org " أولاً ، قم بإعداد حساب على أي خادم مصفوفة لاستخدامه.
قم بإنشاء ملف config for the bot مع معلومات تسجيل الدخول الخاصة به.
هام : تأكد من إعدادك leflist_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 Flake. أسهل طريقة لتثبيت تشاز هي استخدام رقائق NIX.
❯ nix run github:arcuru/chazيحتوي Flake على تراكب لتسهيل الاستيراد إلى تكوين Flake الخاص بك. للاستخدام ، أضفه إلى مدخلاتك:
inputs . chaz . url = "github:arcuru/chaz" ; ثم أضف inputs.chaz.overlays.default التراكب.
يحتوي Flake أيضًا على وحدة مديرة منزلية لتثبيت Chaz كخدمة. استيراد الوحدة النمطية إلى تكوين المدير المنزلي الخاص بك ويمكنك تكوين chaz All من داخل 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" ;
} ;
} ;
} يعكس Github و CodeBerg. جيثب هو الريبو الرسمي ، ولكن استخدم إما الريبو للمساهمة. لا يمكن مزامنة المشكلات ، لذلك قد يكون هناك بعض التكرارات.