Commit Graph

100 Commits

Author SHA1 Message Date
Slavi Pantaleev
49471c1df0 Upgrade mxlink (1.6.0 -> 1.7.0) and matrix-sdk (0.10.0 -> 0.11.0) 2025-04-12 07:49:26 +03:00
Slavi Pantaleev
8f956d2329 Release 1.5.1 v1.5.1 2025-03-31 14:37:23 +03:00
Slavi Pantaleev
ba4aa35987 Upgrade Rust compiler in container image (1.85.0 -> 1.85.1) 2025-03-31 14:33:49 +03:00
Slavi Pantaleev
06d699a17d Update dependencies 2025-03-31 14:33:49 +03:00
Slavi Pantaleev
77d41fb7eb Update services 2025-03-31 14:33:49 +03:00
Slavi Pantaleev
aaf283dde3 Upgrade Element Web (v1.11.93 -> v1.11.96) and adapt to its own way of running as a non-privileged user 2025-03-31 14:33:49 +03:00
Slavi Pantaleev
17eafa86af Release 1.5.0 v1.5.0 2025-02-27 11:29:26 +02:00
Slavi Pantaleev
4704934b06 Run amd64 builds on a self-hosted runner 2025-02-27 11:06:18 +02:00
Slavi Pantaleev
6719538530 Switch to using native ARM64 builders
The workflow code is inspired by https://github.com/matrix-org/matrix-hookshot/pull/1007

Ref: https://github.blog/news-insights/product-news/arm64-on-github-actions-powering-faster-more-efficient-build-systems/

This decreases build times from ~40 minutes (on powerful self-hosted runners) to ~8 minutes (on public runners).
2025-02-27 10:31:23 +02:00
Slavi Pantaleev
59e2746578 Remove explicit lifetime to fix clippy-reported warning 2025-02-27 09:58:58 +02:00
Slavi Pantaleev
47d8edea70 Add support for configuring max_completion_tokens for OpenAI
Related to db9422740c
2025-02-27 09:58:58 +02:00
Slavi Pantaleev
692d61b239 Replace Anthropic library (anthropic-rs -> anthropic) and switch default recommended model (claude-3-5-sonnet-20240620 -> claude-3-7-sonnet-20250219)
Fixes https://github.com/etkecc/baibot/issues/22

Ultimate related to `anthropic-rs` hardcoding models as enumeration variants in the code
and not updating them. See:
- https://github.com/roushou/mesh/issues/1
- https://github.com/roushou/mesh/pull/2

https://github.com/cortesi/misanthropy was also considered as an
alternative, but it did not allow configuring the base API URL like our
old Anthropic library (`anthropic-rs`) and like our new choice (`anthropic`).
We'd rather not lose support for this, so we're going with the `anthropic` library.
2025-02-27 09:44:49 +02:00
Slavi Pantaleev
05902f4c17 Add fmt justfile recipe 2025-02-27 09:31:26 +02:00
Slavi Pantaleev
7e66068b16 Update dependencies 2025-02-27 07:48:10 +02:00
Slavi Pantaleev
406141cd7d fmt 2025-02-27 07:46:16 +02:00
Slavi Pantaleev
c051da2f4a Add config setting controlling if a self-introduction message is posted after joining a room
Fixes https://github.com/etkecc/baibot/issues/32
2025-02-26 20:51:24 +02:00
Slavi Pantaleev
1ff7e8cf79 Switch Rust edition (2021 -> 2024) 2025-02-26 20:51:24 +02:00
Slavi Pantaleev
b3bca98e84 Upgrade Rust compiler in container image (1.82.0 -> 1.85.0) 2025-02-26 20:51:24 +02:00
Slavi Pantaleev
c07b712318 Upgrade mxlink (1.5.0 -> 1.6.0) and matrix-sdk (0.9.0 -> 0.10.0) 2025-02-26 20:51:24 +02:00
Slavi Pantaleev
6741483056 Update dependencies 2025-02-26 20:51:24 +02:00
Slavi Pantaleev
06b2b6d776 Use progress indicator emoji (⏳), not 🦻 to indicate that speech-to-text is happening
🦻 is used for another purpose - to denote that a message is one coming
from speech-to-text, by:

- having the bot react to its own speech-to-text transcription message
  with the 🦻 emoji when it's posted in a non-thread

- having the bot prefix its speech-to-text transcription messages with
  `> 🦻` when it's posted in a thread

⏳ is already used as a progress indicator for other features, so it
makes sense to use it for indicating that speech-to-text is happening for a given audio message as well.
While 🦻 was an even more descriptive illustration of what's actually happening to the audio message
("it's being heard by the bot"), us using the 🦻 emoji for different things didn't seem good.
2025-02-26 20:51:24 +02:00
Slavi Pantaleev
a1bd292752 Add support for making Text-To-Speech send regular text messages instead of notices
When speech-to-text/flow-type = `only_transcribe`, the bot will now send
text messages by default, not notices.

While notice messages may be less desirable with other bots in the room,
it's probably a better default for most people who enable "transcribe-only" mode.

This is an improvement related to https://github.com/etkecc/baibot/issues/14
2025-02-26 20:51:08 +02:00
Slavi Pantaleev
e4e1fe0e7b Upgrade some components 2025-02-26 09:39:48 +02:00
Slavi Pantaleev
45a2d96029 Enable necessary feature for matrix-sdk which affects us if used as a library
Fixes https://github.com/etkecc/rust-mxlink/issues/1
2025-02-02 07:51:25 +02:00
Slavi Pantaleev
ec1879d212 Populate image/audio attachment body with a filename, not with text
Various clients (including newer versions of Element Web), do not like
it when the `body` field of the attachment is not a file name.

For images, a preview may not be shown and downloading the attachment
may suggest that the whole long text is used as a filename (which is odd).

There is value (improved accessibility, etc.)
in adding better descriptions (especially to generated images),
but given that it's currently problematic, I'm getting rid of it.
It's better and safer if we stick to using filenames.
2025-01-24 11:35:08 +02:00
Slavi Pantaleev
5e6a600895 Update dependencies 2025-01-24 10:55:12 +02:00
Slavi Pantaleev
3db924b124 Upgrade services 2025-01-24 10:01:50 +02:00
Slavi Pantaleev
ff7a5ef7af Install SQLite 3 for test-and-clippy CI job 2024-12-12 12:25:56 +02:00
Slavi Pantaleev
cd7d9137e8 Fix broken commit link in changelog entry 2024-12-12 12:03:25 +02:00
Slavi Pantaleev
0d509b2d0e Release 1.4.1 v1.4.1 2024-12-12 12:01:22 +02:00
Slavi Pantaleev
3c47d40781 Upgrade mxlink to fix incorrect on-being-last-member determination
Related to ec69da79ff
2024-12-12 12:00:47 +02:00
Slavi Pantaleev
78893247e7 Mention Matrix authenticated media support for the 1.4.0 release
Related to https://github.com/etkecc/baibot/issues/12
2024-11-20 07:41:05 +02:00
Slavi Pantaleev
4847bd8ba8 Enable authenticated media for the local Synapse service
This is now supported thanks to us upgrading mxlink/matrix-sdk
in 39a184e5d0.
2024-11-20 07:40:08 +02:00
Slavi Pantaleev
c8abf0e316 Release 1.4.0 v1.4.0 2024-11-19 21:05:56 +02:00
Slavi Pantaleev
39a184e5d0 Adapt to mxlink 1.4.0 (matrix-sdk 0.8.0) 2024-11-19 20:57:35 +02:00
Slavi Pantaleev
9d166e35ba Add missing typing notices sending functionality while generating images 2024-11-19 20:46:23 +02:00
Slavi Pantaleev
4a5966401c Release 1.3.2 v1.3.2 2024-11-12 10:37:49 +02:00
Slavi Pantaleev
d92dfba2bf Upgrade Rust compiler in container image (1.81.0 -> 1.82.0) 2024-11-12 10:37:16 +02:00
Slavi Pantaleev
8538d6b2b8 Upgrade component services 2024-11-12 10:36:54 +02:00
Slavi Pantaleev
23f763ba72 Update dependencies 2024-11-12 10:22:26 +02:00
Slavi Pantaleev
a9e4ab1bdb Release 1.3.1 v1.3.1 2024-10-03 16:30:58 +03:00
Slavi Pantaleev
d9a045a5e4 Make fallback user mentions support also match against the bot's room-specific username
It seems like Element iOS benefits from this.
2024-10-03 16:28:49 +03:00
Slavi Pantaleev
393be9be5a Remove strip_rich_reply_fallback_text in favor of remove_plain_reply_fallback from ruma events
No need to reinvent the wheel.
2024-10-03 16:02:06 +03:00
Slavi Pantaleev
a7b016a3d3 Release 1.3.0 v1.3.0 2024-10-03 12:08:00 +03:00
Slavi Pantaleev
85e66406dc Allow for prompt caching to work by using baibot_conversation_start_time_utc instead of baibot_now_utc
This patch introduces a new `baibot_conversation_start_time_utc`
variable which indicates the time the conversation got started.

Using `baibot_now_utc` is still possible, but given that the current
time is a moving target, its use is in conflict with prompt caching.

Because the new `baibot_conversation_start_time_utc` prompt variable
is a more reasonable default, we're now using it in all sample configs.
2024-10-03 11:48:14 +03:00
Slavi Pantaleev
db9422740c Add support for OpenAI's o1 models by making max_response_tokens optional
The other prerequisite seems to be not using a `prompt` (`prompt: null`),
but we already supported this.

It'd be nice to add an optional `max_completion_tokens` parameter as
well, for the benefit of the o1 models, but this is not yet supported by
async-openai.
Possibly tracked here: https://github.com/64bit/async-openai/issues/272
2024-10-03 10:36:28 +03:00
Slavi Pantaleev
90fbad5b64 Update sample & default OpenAI provider configs to use gpt-4o (instead of gpt-4o-2024-08-06)
Since 2024-10-02, `gpt-4o` is actually the same as `gpt-4o-2024-08-06`.

We previously used `gpt-4o-2024-08-06`, because it was pointing to a
much better (longer context) model. Since they're both the same now,
we'd better stick to the unpinned model and make it easier for future
users to get upgrades.
2024-10-03 09:26:41 +03:00
Slavi Pantaleev
b40226826f Restore fallback support for user mentions
Fallback support was intentionally removed in 9908512968,
because it was deemed OK to do so.

It turns out that Element iOS still doesn't properly do user mentions
(and likely never will, until Element X replaces it), so we can't just
drop the fallback user mentions logic without affecting all these
clients. It's possible that the Element Android is no better (unverified claim).
2024-10-03 09:18:02 +03:00
Slavi Pantaleev
b89f0db71a Relocate "On-demand involvement" feature description section
[skip ci]
2024-10-02 09:12:12 +03:00
Slavi Pantaleev
36fdb46633 Release 1.2.0 v1.2.0 2024-10-01 22:01:17 +03:00