Merge branch 'main' of https://github.com/0xPlaygrounds/rig into fix/multiple-tool-calling

This commit is contained in:
0xMochan 2025-04-17 14:34:02 -07:00
commit 06a9bcf568
26 changed files with 169 additions and 68 deletions

86
Cargo.lock generated
View File

@ -8622,7 +8622,7 @@ checksum = "57397d16646700483b67d2dd6511d79318f9d057fdbd21a4066aeac8b41d310a"
[[package]]
name = "rig-bedrock"
version = "0.1.0"
version = "0.1.1"
dependencies = [
"anyhow",
"async-stream",
@ -8631,7 +8631,7 @@ dependencies = [
"aws-smithy-types",
"base64 0.22.1",
"reqwest 0.12.15",
"rig-core 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
"rig-core 0.11.0",
"rig-derive",
"schemars",
"serde",
@ -8644,6 +8644,27 @@ dependencies = [
[[package]]
name = "rig-core"
version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ff893305131b471009ab11df388612beb603ed94bb12412c256fe197b7591aa6"
dependencies = [
"async-stream",
"base64 0.22.1",
"bytes",
"futures",
"glob",
"mime_guess",
"ordered-float",
"reqwest 0.12.15",
"schemars",
"serde",
"serde_json",
"thiserror 1.0.69",
"tracing",
]
[[package]]
name = "rig-core"
version = "0.11.1"
dependencies = [
"anyhow",
"assert_fs",
@ -8674,36 +8695,15 @@ dependencies = [
"worker",
]
[[package]]
name = "rig-core"
version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ff893305131b471009ab11df388612beb603ed94bb12412c256fe197b7591aa6"
dependencies = [
"async-stream",
"base64 0.22.1",
"bytes",
"futures",
"glob",
"mime_guess",
"ordered-float",
"reqwest 0.12.15",
"schemars",
"serde",
"serde_json",
"thiserror 1.0.69",
"tracing",
]
[[package]]
name = "rig-derive"
version = "0.1.0"
version = "0.1.1"
dependencies = [
"convert_case 0.6.0",
"indoc",
"proc-macro2",
"quote",
"rig-core 0.11.0",
"rig-core 0.11.1",
"serde",
"serde_json",
"syn 2.0.100",
@ -8713,12 +8713,12 @@ dependencies = [
[[package]]
name = "rig-eternalai"
version = "0.2.4"
version = "0.2.5"
dependencies = [
"anyhow",
"ethers",
"reqwest 0.12.15",
"rig-core 0.11.0",
"rig-core 0.11.1",
"schemars",
"serde",
"serde_json",
@ -8729,11 +8729,11 @@ dependencies = [
[[package]]
name = "rig-fastembed"
version = "0.1.4"
version = "0.1.5"
dependencies = [
"anyhow",
"fastembed",
"rig-core 0.11.0",
"rig-core 0.11.1",
"schemars",
"serde",
"serde_json",
@ -8743,7 +8743,7 @@ dependencies = [
[[package]]
name = "rig-lancedb"
version = "0.2.8"
version = "0.2.9"
dependencies = [
"anyhow",
"arrow-array",
@ -8751,7 +8751,7 @@ dependencies = [
"futures",
"httpmock",
"lancedb",
"rig-core 0.11.0",
"rig-core 0.11.1",
"serde",
"serde_json",
"tokio",
@ -8759,13 +8759,13 @@ dependencies = [
[[package]]
name = "rig-mongodb"
version = "0.2.8"
version = "0.2.9"
dependencies = [
"anyhow",
"futures",
"httpmock",
"mongodb",
"rig-core 0.11.0",
"rig-core 0.11.1",
"serde",
"serde_json",
"testcontainers",
@ -8776,13 +8776,13 @@ dependencies = [
[[package]]
name = "rig-neo4j"
version = "0.2.8"
version = "0.2.9"
dependencies = [
"anyhow",
"futures",
"httpmock",
"neo4rs",
"rig-core 0.11.0",
"rig-core 0.11.1",
"serde",
"serde_json",
"term_size",
@ -8795,14 +8795,14 @@ dependencies = [
[[package]]
name = "rig-postgres"
version = "0.1.6"
version = "0.1.7"
dependencies = [
"anyhow",
"dotenvy",
"httpmock",
"log",
"pgvector",
"rig-core 0.11.0",
"rig-core 0.11.1",
"serde",
"serde_json",
"sqlx",
@ -8816,12 +8816,12 @@ dependencies = [
[[package]]
name = "rig-qdrant"
version = "0.1.11"
version = "0.1.12"
dependencies = [
"anyhow",
"httpmock",
"qdrant-client",
"rig-core 0.11.0",
"rig-core 0.11.1",
"serde",
"serde_json",
"testcontainers",
@ -8831,12 +8831,12 @@ dependencies = [
[[package]]
name = "rig-sqlite"
version = "0.1.8"
version = "0.1.9"
dependencies = [
"anyhow",
"chrono",
"httpmock",
"rig-core 0.11.0",
"rig-core 0.11.1",
"rusqlite",
"serde",
"serde_json",
@ -8850,10 +8850,10 @@ dependencies = [
[[package]]
name = "rig-surrealdb"
version = "0.1.3"
version = "0.1.4"
dependencies = [
"anyhow",
"rig-core 0.11.0",
"rig-core 0.11.1",
"serde",
"serde_json",
"surrealdb",

14
rig-bedrock/CHANGELOG.md Normal file
View File

@ -0,0 +1,14 @@
# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased]
## [0.1.1](https://github.com/0xPlaygrounds/rig/compare/rig-bedrock-v0.1.0...rig-bedrock-v0.1.1) - 2025-04-12
### Other
- updated the following local packages: rig-derive

View File

@ -1,6 +1,6 @@
[package]
name = "rig-bedrock"
version = "0.1.0"
version = "0.1.1"
edition = "2021"
license = "MIT"
readme = "README.md"
@ -8,7 +8,7 @@ description = "AWS Bedrock model provider for Rig integration."
[dependencies]
rig-core = { version = "0.11.0", features = ["image"] }
rig-derive = { path = "../rig-core/rig-core-derive", version = "0.1.0" }
rig-derive = { path = "../rig-core/rig-core-derive", version = "0.1.1" }
serde = { version = "1.0.193", features = ["derive"] }
serde_json = "1.0.108"
schemars = "0.8.16"

View File

@ -7,6 +7,25 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
## [0.11.1](https://github.com/0xPlaygrounds/rig/compare/rig-core-v0.11.0...rig-core-v0.11.1) - 2025-04-12
### Added
- trait for embedding images ([#396](https://github.com/0xPlaygrounds/rig/pull/396))
- Add `rig_tool` macro ([#353](https://github.com/0xPlaygrounds/rig/pull/353))
- impl From<mcp_core::types::Tool> for ToolDefinition ([#385](https://github.com/0xPlaygrounds/rig/pull/385))
- AWS Bedrock provider ([#318](https://github.com/0xPlaygrounds/rig/pull/318))
### Fixed
- gemini embeddings does not work for multiple documents ([#386](https://github.com/0xPlaygrounds/rig/pull/386))
- deserialization error due to serde rename of tool result ([#374](https://github.com/0xPlaygrounds/rig/pull/374))
### Other
- Updated broken link xaiAPI in `completion.rs` ([#384](https://github.com/0xPlaygrounds/rig/pull/384))
- Fix Clippy warnings for doc indentation and Error::other usage ([#364](https://github.com/0xPlaygrounds/rig/pull/364))
## [0.11.0](https://github.com/0xPlaygrounds/rig/compare/rig-core-v0.10.0...rig-core-v0.11.0) - 2025-03-31
### Added

View File

@ -1,6 +1,6 @@
[package]
name = "rig-core"
version = "0.11.0"
version = "0.11.1"
edition = "2021"
license = "MIT"
readme = "README.md"
@ -27,7 +27,7 @@ futures = "0.3.29"
ordered-float = "4.2.0"
schemars = "0.8.16"
thiserror = "1.0.61"
rig-derive = { version = "0.1.0", path = "./rig-core-derive", optional = true }
rig-derive = { version = "0.1.1", path = "./rig-core-derive", optional = true }
glob = "0.3.1"
lopdf = { version = "0.35.0", optional = true }
epub = { version = "2.1.2", optional = true }

View File

@ -10,7 +10,7 @@ use rig::{
use serde::{Deserialize, Serialize};
use serde_json::json;
/// Runs 4 agents based on deepseek R1 (dervived from the other examples)
/// Runs 4 agents based on deepseek R1 (derived from the other examples)
#[tokio::main]
async fn main() -> Result<(), anyhow::Error> {
println!("Running basic agent with deepseek R1");
@ -117,7 +117,7 @@ async fn context() -> Result<(), anyhow::Error> {
// Create an agent with multiple context documents
let agent = AgentBuilder::new(model)
.context("Definition of a *flurbo*: A flurbo is a green alien that lives on cold planets")
.context("Definition of a *glarb-glarb*: A glarb-glarb is a ancient tool used by the ancestors of the inhabitants of planet Jiro to farm the land.")
.context("Definition of a *glarb-glarb*: A glarb-glarb is an ancient tool used by the ancestors of the inhabitants of planet Jiro to farm the land.")
.context("Definition of a *linglingdong*: A term used by inhabitants of the far side of the moon to describe humans.")
.build();

View File

@ -0,0 +1,14 @@
# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased]
## [0.1.1](https://github.com/0xPlaygrounds/rig/compare/rig-derive-v0.1.0...rig-derive-v0.1.1) - 2025-04-12
### Added
- Add `rig_tool` macro ([#353](https://github.com/0xPlaygrounds/rig/pull/353))

View File

@ -1,6 +1,6 @@
[package]
name = "rig-derive"
version = "0.1.0"
version = "0.1.1"
edition = "2021"
license = "MIT"
description = "Internal crate that implements Rig derive macros."

View File

@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
## [0.2.5](https://github.com/0xPlaygrounds/rig/compare/rig-eternalai-v0.2.4...rig-eternalai-v0.2.5) - 2025-04-12
### Other
- updated the following local packages: rig-core
## [0.2.4](https://github.com/0xPlaygrounds/rig/compare/rig-eternalai-v0.2.3...rig-eternalai-v0.2.4) - 2025-03-31
### Other

View File

@ -1,6 +1,6 @@
[package]
name = "rig-eternalai"
version = "0.2.4"
version = "0.2.5"
edition = "2021"
license = "MIT"
readme = "README.md"
@ -8,7 +8,7 @@ description = "EternalAI model provider Rig integration."
repository = "https://github.com/0xPlaygrounds/rig"
[dependencies]
rig-core = { path = "../rig-core", version = "0.11.0" }
rig-core = { path = "../rig-core", version = "0.11.1" }
ethers = "2.0.14"
reqwest = { version = "0.12.12", features = ["json"] }
serde = { version = "1.0.193", features = ["derive"] }

View File

@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
## [0.1.5](https://github.com/0xPlaygrounds/rig/compare/rig-fastembed-v0.1.4...rig-fastembed-v0.1.5) - 2025-04-12
### Other
- updated the following local packages: rig-core
## [0.1.4](https://github.com/0xPlaygrounds/rig/compare/rig-fastembed-v0.1.3...rig-fastembed-v0.1.4) - 2025-03-31
### Added

View File

@ -1,6 +1,6 @@
[package]
name = "rig-fastembed"
version = "0.1.4"
version = "0.1.5"
edition = "2021"
license = "MIT"
readme = "README.md"
@ -8,7 +8,7 @@ description = "Rig vector store index integration for Fastembed. https://github.
repository = "https://github.com/0xPlaygrounds/rig"
[dependencies]
rig-core = { path = "../rig-core", version = "0.11.0" }
rig-core = { path = "../rig-core", version = "0.11.1" }
serde = { version = "1.0.193", features = ["derive"] }
serde_json = "1.0.108"
tracing = "0.1.40"

View File

@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
## [0.2.9](https://github.com/0xPlaygrounds/rig/compare/rig-lancedb-v0.2.8...rig-lancedb-v0.2.9) - 2025-04-12
### Other
- *(lancedb)* docs, make examples idempotent ([#387](https://github.com/0xPlaygrounds/rig/pull/387))
## [0.2.8](https://github.com/0xPlaygrounds/rig/compare/rig-lancedb-v0.2.7...rig-lancedb-v0.2.8) - 2025-03-31
### Other

View File

@ -1,6 +1,6 @@
[package]
name = "rig-lancedb"
version = "0.2.8"
version = "0.2.9"
edition = "2021"
license = "MIT"
readme = "README.md"
@ -9,7 +9,7 @@ repository = "https://github.com/0xPlaygrounds/rig"
[dependencies]
lancedb = "0.18.1"
rig-core = { path = "../rig-core", version = "0.11.0" }
rig-core = { path = "../rig-core", version = "0.11.1" }
arrow-array = "54.2.1"
serde_json = "1.0.128"
serde = "1.0.210"

View File

@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
## [0.2.9](https://github.com/0xPlaygrounds/rig/compare/rig-mongodb-v0.2.8...rig-mongodb-v0.2.9) - 2025-04-12
### Other
- updated the following local packages: rig-core
## [0.2.8](https://github.com/0xPlaygrounds/rig/compare/rig-mongodb-v0.2.7...rig-mongodb-v0.2.8) - 2025-03-31
### Other

View File

@ -1,6 +1,6 @@
[package]
name = "rig-mongodb"
version = "0.2.8"
version = "0.2.9"
edition = "2021"
license = "MIT"
readme = "README.md"
@ -12,7 +12,7 @@ repository = "https://github.com/0xPlaygrounds/rig"
[dependencies]
futures = "0.3.30"
mongodb = "3.1.0"
rig-core = { path = "../rig-core", version = "0.11.0" }
rig-core = { path = "../rig-core", version = "0.11.1" }
serde = { version = "1.0.203", features = ["derive"] }
serde_json = "1.0.117"
tracing = "0.1.40"

View File

@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
## [0.2.9](https://github.com/0xPlaygrounds/rig/compare/rig-neo4j-v0.2.8...rig-neo4j-v0.2.9) - 2025-04-12
### Other
- Fix Clippy warnings for doc indentation and Error::other usage ([#364](https://github.com/0xPlaygrounds/rig/pull/364))
## [0.2.8](https://github.com/0xPlaygrounds/rig/compare/rig-neo4j-v0.2.7...rig-neo4j-v0.2.8) - 2025-03-31
### Other

View File

@ -1,6 +1,6 @@
[package]
name = "rig-neo4j"
version = "0.2.8"
version = "0.2.9"
edition = "2021"
license = "MIT"
readme = "README.md"
@ -12,7 +12,7 @@ repository = "https://github.com/0xPlaygrounds/rig"
[dependencies]
futures = "0.3.30"
neo4rs = "0.8.0"
rig-core = { path = "../rig-core", version = "0.11.0" }
rig-core = { path = "../rig-core", version = "0.11.1" }
serde = { version = "1.0.203", features = ["derive"] }
serde_json = "1.0.117"
tracing = "0.1.40"

View File

@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
## [0.1.7](https://github.com/0xPlaygrounds/rig/compare/rig-postgres-v0.1.6...rig-postgres-v0.1.7) - 2025-04-12
### Other
- updated the following local packages: rig-core
## [0.1.6](https://github.com/0xPlaygrounds/rig/compare/rig-postgres-v0.1.5...rig-postgres-v0.1.6) - 2025-03-31
### Other

View File

@ -1,6 +1,6 @@
[package]
name = "rig-postgres"
version = "0.1.6"
version = "0.1.7"
edition = "2021"
description = "PostgreSQL-based vector store implementation for the rig framework"
license = "MIT"
@ -8,7 +8,7 @@ readme = "README.md"
repository = "https://github.com/0xPlaygrounds/rig"
[dependencies]
rig-core = { path = "../rig-core", version = "0.11.0", features = ["derive"] }
rig-core = { path = "../rig-core", version = "0.11.1", features = ["derive"] }
serde = { version = "1.0.215", features = ["derive"] }
serde_json = "1.0.133"

View File

@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
## [0.1.12](https://github.com/0xPlaygrounds/rig/compare/rig-qdrant-v0.1.11...rig-qdrant-v0.1.12) - 2025-04-12
### Other
- Fix Clippy warnings for doc indentation and Error::other usage ([#364](https://github.com/0xPlaygrounds/rig/pull/364))
## [0.1.11](https://github.com/0xPlaygrounds/rig/compare/rig-qdrant-v0.1.10...rig-qdrant-v0.1.11) - 2025-03-31
### Other

View File

@ -1,6 +1,6 @@
[package]
name = "rig-qdrant"
version = "0.1.11"
version = "0.1.12"
edition = "2021"
license = "MIT"
readme = "README.md"
@ -8,7 +8,7 @@ description = "Rig vector store index integration for Qdrant. https://qdrant.tec
repository = "https://github.com/0xPlaygrounds/rig"
[dependencies]
rig-core = { path = "../rig-core", version = "0.11.0" }
rig-core = { path = "../rig-core", version = "0.11.1" }
serde_json = "1.0.128"
serde = "1.0.210"
qdrant-client = "1.13.0"

View File

@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
## [0.1.9](https://github.com/0xPlaygrounds/rig/compare/rig-sqlite-v0.1.8...rig-sqlite-v0.1.9) - 2025-04-12
### Other
- updated the following local packages: rig-core
## [0.1.8](https://github.com/0xPlaygrounds/rig/compare/rig-sqlite-v0.1.7...rig-sqlite-v0.1.8) - 2025-03-31
### Other

View File

@ -1,6 +1,6 @@
[package]
name = "rig-sqlite"
version = "0.1.8"
version = "0.1.9"
edition = "2021"
description = "SQLite-based vector store implementation for the rig framework"
license = "MIT"
@ -9,7 +9,7 @@ license = "MIT"
doctest = false
[dependencies]
rig-core = { path = "../rig-core", version = "0.11.0", features = ["derive"] }
rig-core = { path = "../rig-core", version = "0.11.1", features = ["derive"] }
rusqlite = { version = "0.32", features = ["bundled"] }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"

View File

@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
## [0.1.4](https://github.com/0xPlaygrounds/rig/compare/rig-surrealdb-v0.1.3...rig-surrealdb-v0.1.4) - 2025-04-12
### Other
- updated the following local packages: rig-core
## [0.1.3](https://github.com/0xPlaygrounds/rig/compare/rig-surrealdb-v0.1.2...rig-surrealdb-v0.1.3) - 2025-03-31
### Other

View File

@ -1,13 +1,13 @@
[package]
name = "rig-surrealdb"
version = "0.1.3"
version = "0.1.4"
edition = "2021"
description = "SurrealDB vector store implementation for the rig framework"
license = "MIT"
[dependencies]
surrealdb = { version = "2.1.4", features = ["protocol-ws", "kv-mem"] }
rig-core = { path = "../rig-core", version = "0.11.0", features = ["derive"] }
rig-core = { path = "../rig-core", version = "0.11.1", features = ["derive"] }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
tracing = "0.1"