arcuru / chaz

Chaz is an AI bot for Matrix
https://chaz.is
MIT License
45 stars 3 forks source link

Failed to load config at '/root/.config/aichat/config.yaml' #16

Open phdelodder opened 2 weeks ago

phdelodder commented 2 weeks ago

When interacting with Chaz I get the following error:

!chaz Error: Error: Failed to load config at '/root/.config/aichat/config.yaml'  Caused by:     No such file or directory (os error 2) 

Docker:

  chaz:
    image: arcuru/chaz:main # Set to your desired version
    container_name: chaz
    restart: unless-stopped
    network_mode: host
    volumes:
      # Mount your config file to /config.yaml
      - /opt/synapse/chaz/config.yaml:/config.yaml
      # Mount your aichat config to /aichat, AND SET THAT LOCATION IN CHAZ'S CONFIG.YAML
      - /opt/synapse/chaz/aichat-state:/aichat
      - /opt/synapse/chaz/aichat.yaml:/aichat/config.yaml
      # Mount the volume into the same location specified in config.yaml
      - /opt/synapse/chaz/state:/state

config.yaml:

homeserver_url: https://matrix.example.something
username: "chaz"
password: "password"
state_dir: "/state"
aichat_config_dir: "/aichat"
allow_list: "@.*:.example.something"
arcuru commented 2 weeks ago

Thanks for the report! It seems that I broke that setting in the latest update.

As a workaround until I get the chance to fix it, removing the aichat_config_dir from your config.yaml and mounting the files into the default directory should work.

Docker:

  chaz:
    image: arcuru/chaz:main # Set to your desired version
    container_name: chaz
    restart: unless-stopped
    network_mode: host
    volumes:
      # Mount your config file to /config.yaml
      - /opt/synapse/chaz/config.yaml:/config.yaml
      # Mount your aichat config to /aichat, AND SET THAT LOCATION IN CHAZ'S CONFIG.YAML
      - /opt/synapse/chaz/aichat-state:/root/.config/aichat
      - /opt/synapse/chaz/aichat.yaml:/root/.config/aichat/config.yaml
      # Mount the volume into the same location specified in config.yaml
      - /opt/synapse/chaz/state:/state

config.yaml:

homeserver_url: https://matrix.example.something
username: "chaz"
password: "password"
state_dir: "/state"
allow_list: "@.*:.example.something"
phdelodder commented 2 weeks ago

Thanks solved it!