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.
This commit is contained in:
Slavi Pantaleev
2025-02-27 09:31:53 +02:00
parent 05902f4c17
commit 692d61b239
6 changed files with 102 additions and 97 deletions

View File

@@ -15,7 +15,7 @@ name = "baibot"
path = "src/lib.rs"
[dependencies]
anthropic-rs = "0.1.*"
anthropic = "=0.0.8"
anyhow = "1.0.*"
async-openai = "0.27.*"
base64 = "0.22.*"