Files
baibot-withmcp/src/strings/usage.rs

74 lines
3.6 KiB
Rust
Raw Normal View History

2024-09-12 13:44:06 +03:00
pub fn intro(command_prefix: &str) -> String {
let message = r#"
## 📖 Usage
To get an **overview of the current configuration affecting this room**, send a `%command_prefix% config status` command.
To **adjust settings**, see `%command_prefix% config`.
### 💬 Text Generation
If there's a text-generation handler agent configured (see `%command_prefix% config status`), the bot **may** respond to messages sent in the room.
Whether the bot responds depends on the **💬 Text Generation / 🗟 Prefix Requirement** setting (see `%command_prefix% config status`).
Sometimes, a prefix (e.g. `%command_prefix%`) is required in front of messages sent to the room for the bot to respond.
For multi-user rooms, this setting defaults to "required".
2024-09-12 13:44:06 +03:00
Room messages start a threaded conversation where you can continue back-and-forth communication with the bot.
### 🗣️ Text-to-Speech
If there's a text-to-speech handler agent configured (see `%command_prefix% config status`), the bot **may** convert text messages sent to the room to audio (voice).
By default, the bot will offer text-to-speech for its own messages which are a response to voice messages coming from you. Simply click the 🗣️ reaction on the bot's message and the bot will convert the text message to audio. This is configurable via the **🗣️ Text-to-Speech / 🪄 Bot Messages Flow Type** setting.
The bot may be configured to also turn your own text messages to audio (voice) via the **🗣️ Text-to-Speech / 🪄 User Messages Flow Type** setting.
### 🦻 Speech-to-Text
If there's a speech-to-text handler agent configured (see `%command_prefix% config status`), the bot **may** transcribe voice messages sent to the room to text.
By default, the bot will also perform 💬 Text Generation on the text. This is configurable via the **🦻 Speech-to-Text / 🪄 Flow Type** setting.
If all your messages are in the same language, you can improve accuracy & latency by configuring the language via the **🦻 Speech-to-Text / 🔤 Language** setting.
### Image Generation
2024-09-12 13:44:06 +03:00
#### 🖌️ Creating images
2024-09-12 13:44:06 +03:00
Simply send a command like `%command_prefix% image create A beautiful sunset over the ocean` and the bot will start a threaded conversation and post an image based on your prompt.
2024-09-12 13:44:06 +03:00
You can then respond in the same message thread with:
2024-09-12 13:44:06 +03:00
- more messages, to add more criteria to your prompt.
- a message saying `again`, to generate one more image with the current prompt.
#### 🎨 Editing images
2024-09-12 13:44:06 +03:00
Simply send a command like `%command_prefix% image edit Turn the following image into an anime-style drawing` and the bot will start a threaded conversation asking for more details.
You can then respond in the same message thread with:
- more messages, to add more criteria to your prompt.
- one or more images, to provide the images that the bot will operate on.
- a message saying `go`, to start the image generation process.
- a message saying `again`, to prompt the bot to generate one more image edit with the current prompt.
#### 🫵 Creating stickers
A variation of **creating images** is creating "sticker images".
2024-09-12 13:44:06 +03:00
To create a sticker, send a command like `%command_prefix% sticker A huge bowl of steaming ramen with a mountain of beansprouts on top`.
2024-09-12 13:44:06 +03:00
The difference from **creating images** is that the bot will:
2024-09-12 13:44:06 +03:00
- create a smaller-resolution image (as small as the model allows) - smaller/quicker, but still good enough for a sticker
2024-09-12 13:44:06 +03:00
- potentially switch to a different (cheaper or otherwise more suitable) model, if available
- post the image directly to the room (as a reply to your message), without starting a threaded conversation
"#;
message.replace("%command_prefix%", command_prefix)
}