Commit Graph

105 Commits

Author SHA1 Message Date
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
Slavi Pantaleev
04ce8db1fc Update dependencies 2024-10-01 21:35:49 +03:00
Slavi Pantaleev
9908512968 Add support for on-demand involvement
Fixes https://github.com/etkecc/baibot/issues/15
2024-10-01 21:06:54 +03:00
Slavi Pantaleev
eae6472c7a Upgrade services 2024-10-01 18:33:08 +03:00
Slavi Pantaleev
e6aa956423 Do not send blockquote-formatted transcription when replying without a thread
This actually fixes 2 issues.

Fixes https://github.com/etkecc/baibot/issues/14
Fixes https://github.com/etkecc/baibot/issues/17

When people enable transcribe-only mode and the bot replies outside of a
thread, messages will no longer look like this: `> 🦻 Transcribed text`.

Instead, they will:

- look like this: `Transcribed text`

- get an emoji reaction (🦻) sent by the bot itself,
  to indicate that the message is a transcription

---------------------------------------

As https://github.com/etkecc/baibot/issues/14 discusses,
the `> 🦻` prefixing of messages also served the purpose of indicating
to the bot that this is not its own message, but rather something it
"heard" from a user.

Given that out-of-thread replies no longer include this, they could be
mistaken for bot messages.

Because transcribed messages are posted as notice messages, we can
easily tell them apart from regular text-generated messages by the bot
itself, so we can (and do) treat them differently.

Thankfully, the bot does not yet support building a text-generation
conversation from arbitrary messages (something discussed in
https://github.com/etkecc/baibot/issues/15), so these out-of-thread
replies having the wrong owner are not an issue for now.

If we do land support for this, we'll probably need to make the bot inspect such notice messages
posted by it, inspect their reactons and attribute them properly (🦻 -> user message).
2024-09-30 17:35:14 +03:00
Slavi Pantaleev
7a38216192 Upgrade services 2024-09-26 22:32:34 +03:00
Slavi Pantaleev
d522d268e2 Use the same variable-infused prompt for the ollama agent in etc/app/config.yml.dist 2024-09-26 22:32:28 +03:00
Slavi Pantaleev
72120c5dc2 Explicitly keep authenticated media disabled in the Synapse configuration
[skip ci]

Related to https://github.com/etkecc/baibot/issues/12
2024-09-23 06:09:32 +00:00
Slavi Pantaleev
a2c35238c2 Upgrade services
[skip ci]
2024-09-23 06:08:17 +00:00
Slavi Pantaleev
97f5cbb00b Fix example for baibot_now_utc prompt variable
This feature went through a few iterations. At some point,
a `(local timezone/time: unknown)` suffix was part of the
`baibot_now_utc` variable (hoping it improves the model's awareness that
it doesn't know the current local time), but the suffix was ultimately removed
as unnecessary.
2024-09-22 08:52:19 +00:00
Slavi Pantaleev
533b025f6b Release 1.1.1 v1.1.1 2024-09-22 06:45:59 +00:00
Slavi Pantaleev
8b12bdf2b3 Combine consecutive messages by the same user when talking to the Anthropic API
Fixes https://github.com/etkecc/baibot/issues/13
2024-09-22 06:39:53 +00:00
Slavi Pantaleev
d4ddd29660 Upgrade mxlink to fix missing messages in threads
Reported here https://github.com/etkecc/baibot/issues/13#issuecomment-2365273996

Fixed in 88fabb308c
2024-09-22 09:35:15 +03:00
Slavi Pantaleev
941e5f0bc4 Use a cache-less Dockerfile for CI to try and avoid issues 2024-09-21 21:37:45 +03:00
Slavi Pantaleev
d32380e56b Release 1.1.0 v1.1.0 2024-09-21 17:38:28 +03:00
Slavi Pantaleev
c8c5e0e540 Split build-container-image into build-container-image-{debug,release}
This allows `run-in-container` to default to using the much faster
`build-container-image-debug`.
2024-09-21 14:28:38 +00:00
Slavi Pantaleev
2a5a2d6a4d Add support for prompt variables (bot name, date/time, model id)
Fixes https://github.com/etkecc/baibot/issues/10

This also includes them in the default prompts (for newly-created agents),
so that people can get a better experience out of the box.
2024-09-21 14:28:38 +00:00
Slavi Pantaleev
0ee663ee92 Add missing recipe description for run-in-container 2024-09-21 14:28:38 +00:00
Slavi Pantaleev
5de7559ed6 Explicitly set up QEMU to try and work around CI trouble
Related to https://github.com/etkecc/baibot/issues/2

We've had a few more instances of the same issue since then.
2024-09-21 14:28:38 +00:00
Slavi Pantaleev
bba5b7996b Make run-in-container explicitly run the :latest container image 2024-09-19 18:21:42 +03:00
Slavi Pantaleev
354063abb7 Shave off ~20MB from resulting container image by purging apt cache 2024-09-19 18:18:56 +03:00
Slavi Pantaleev
d59e6b59c2 Upgrade Rust compiler in container image (1.80.1 -> 1.81.0) 2024-09-19 18:18:21 +03:00
Slavi Pantaleev
e0ae874e3a Improve Access documentation page
[skip ci]
2024-09-19 16:22:59 +03:00
Slavi Pantaleev
3c91b50d60 Improve "Room-local agent managers" section 2024-09-19 16:11:55 +03:00
Slavi Pantaleev
5f7b1c9e38 Remove useless use of format!()
[skip ci]
2024-09-19 14:07:35 +03:00
Slavi Pantaleev
2dbd600d05 Release 1.0.6 v1.0.6 2024-09-19 14:03:00 +03:00
Slavi Pantaleev
f6cc8363d1 Allow regular (unprivileged) users to see providers help and adapt it to them 2024-09-19 13:39:52 +03:00
Slavi Pantaleev
e3b07aa291 Improve bot make-use-of-me steps in introduction message
This especially improves the introduction for when the bot has no
configured agents.
2024-09-19 12:24:03 +03:00
Slavi Pantaleev
324c8a976f Relocate some access check code 2024-09-19 10:02:23 +03:00
Slavi Pantaleev
fb1f16aa40 Add missing new line before closing code-block 2024-09-18 09:15:23 +03:00
Slavi Pantaleev
012069891d Adjust incorrect comment
[skip ci]
2024-09-18 08:53:33 +03:00
Slavi Pantaleev
3b7c28a55e Release 1.0.5 v1.0.5 2024-09-14 10:47:56 +03:00
Slavi Pantaleev
3b25b92a81 Implement more fine-grained typing notices sending
The previous approach (implemented in dd1dd78312) was simple
(send typing notices for as long as the "controller" is running),
but this proved to be overly simplistic and unable to handle edge-cases:

- in multi-user rooms (or rooms with a prefix requirement), the bot
  used to send a typing notice while "working", but its work consisted
  of ignoring the message. So it then sent a "not typing" notice.
  This is wasteful and otherwise problematic - certain clients (like nheko)
  do not handle this "race" well.

- certain reactions (anything other than 🗣️ right now) are meant to be
  ignored. There's no point in doing the same "typing / not typing"
  dance

- there are other instances where the bot may do work, but doesn't (due
  to configuration or lack of capabilities)

This new more fine-grained implementation of typing notices aims to:

- only send a typing notice if actual "slow work" will be done

- avoid stopping & restarting typing notices (wasteful) if a chain of work is to
  be performed (processing voice messages and doing speech-to-text +
  text-generation + ...). Rather, maintaining typing notice sending
  throughout
2024-09-14 10:39:20 +03:00
Slavi Pantaleev
509f683365 Fix typo 2024-09-14 09:30:58 +03:00
Slavi Pantaleev
a986e29f51 Release 1.0.4 v1.0.4 2024-09-13 21:46:15 +03:00
Slavi Pantaleev
dd1dd78312 Rework typing notifications
Previously, the bot only had rudimentary typing notification support.

It used to send a single notification when starting a long task
and did not bother with notifications anymore.
By default matrix-rust-sdk gives these notifications a validity of 4
seconds, so it would expire shortly. If the bot takes longer to respond,
you'd see the typing notification expire and wonder if a response is
coming.

Another edge case is the bot sending an answer quicker and the typing
notice still being on. Some clients (like element-web) seem to hide the
typing notice when a new message comes, so they don't experience this as
problematic.

The reworked typing notification system should be robust:

- typing notices are sent continuously, until the bot finishes doing
  work
- if the bot is performing multiple actions in a room (even for
  different people), typing notices would continue to be sent until the
  bot becomes idle
- as soon as the bot becomes idle, a "not typing anymore" notice is sent
  to clear the state
2024-09-13 21:40:24 +03:00
Slavi Pantaleev
f2b1115dc9 Populate CHANGELOG 2024-09-13 21:39:19 +03:00
Slavi Pantaleev
5742d88d45 Release 1.0.3 v1.0.3 2024-09-13 12:33:35 +03:00
Slavi Pantaleev
1be035d94c Upgrade mxlink (1.0.0 -> 1.1.0)
This brings in a fix that allows for auto-recovery from errors
that occur during matrix-rust-sdk startup.
2024-09-13 11:38:07 +03:00
Slavi Pantaleev
601420d561 Fix broken links to "sample provider configs"
[skip ci]
2024-09-12 22:18:51 +03:00
Slavi Pantaleev
b18be4e452 Decrease number of keywords in Cargo.toml to the maximum allowed (5) v1.0.2 2024-09-12 22:03:40 +03:00
Slavi Pantaleev
d1622abd47 Switch from exclude to include in Cargo.toml to whitelist the logo 2024-09-12 22:00:08 +03:00
Slavi Pantaleev
62d88660e9 Bump version (1.0.0 -> 1.0.1) v1.0.1 2024-09-12 21:52:17 +03:00
Slavi Pantaleev
adc129505c Switch from openai_api_rust via git repository to published etke_openai_api_rust crate 2024-09-12 21:51:13 +03:00
Slavi Pantaleev
cc28935ab1 Add .github to Cargo.toml exclude list
[skip ci]
2024-09-12 21:16:40 +03:00
Slavi Pantaleev
e09f26ce0d Fix broken link to Handlers docs page
[skip ci]
2024-09-12 16:34:42 +03:00