This is a huge patch which does some major refactoring like: - renaming "Image Generation" to "Image Creation" in most places, to better match its new command (`!bai image create`) - relocating image creation command (`!bai image` -> `!bai image create`), so it wouldn't conflict with the new image editing command (`!bai image edit`) - introducing a new image editing command (`!bai image edit`), which is meant to work only with the OpenAI provider, but doesn't fully work yet due to https://github.com/64bit/async-openai/issues/364, though a next patch will fix it - adding support for reading images off of Matrix conversations and forwarding them to text conversations. Works for OpenAI, but not for Anthropic yet (requires custom patches) and not for OpenAI-Compat (no support for images there) - relocating some utils around (base64, mime)
🛠️ Configuration
The bot's behavior is controlled by a combination of static and dynamic configuration.
Static configuration
The bot can be configured using a YAML configuration file as well as environment variables.
When running the bot locally (during 🧑💻 development), the bot's configuration is read from the var/app/config.yml file.
This file is created from the template found in etc/app/config.yml.dist.
Certain keys can be left unset, in which case 📝 hardcoded defaults would be used.
Each configuration key found in the YAML configuration can be overridden by setting an environment variable (dots should be replaced with _). Example:
- to override
command_prefix, set an environment variableBAIBOT_COMMAND_PREFIX - to override
homeserver.server_name, set an environment variableBAIBOT_HOMESERVER_SERVER_NAME
The static configuration contains an initial_global_config key, which is used to populate the bot's global configuration (stored as dynamic configuration) the first time the bot starts. Modifying this subsequently will not have any effect. After initial global configuration creation, it's expected to be managed dynamically via chat commands.
Dynamic configuration
Besides the bot's static configuration, the bot can also be configured dynamically at runtime (via chat messages).
This includes changes to 🔒 Access, 🤖 Agents and 🛠️ Room Settings.
Room Settings
Room Settings come from 3 different levels with priority in the following order (higher to lower):
- 📍 per-room (
!bai config room ..commands) - 🌐 globally (
!bai config global ..commands) - 📝 as hardcoded defaults
You can adjust the following settings per room and/or globally:
Refer to the bot's help messages (as a response to a !bai config help command) for the most up-to-date information on what Room Settings can be configured.
You can get an overview of the configuration affecting the current room (a mix of hardcoded defaults, agent defaults, global and room-level settings) by sending a !bai config status command to the room.