chore: dependabot deps update

chore: openai version bump
This commit is contained in:
Per Stark
2026-06-20 10:38:20 +02:00
parent 09e545816e
commit 87e6fa14b2
12 changed files with 249 additions and 97 deletions
+2
View File
@@ -3,6 +3,8 @@
## Unreleased ## Unreleased
- Fix: added pre-commit hooks to further maintain code consistency. - Fix: added pre-commit hooks to further maintain code consistency.
- Security: updated some deps because dependabot told me, good bot.
- Security: bump `async-openai` to 0.41.1 (feature-gated types, transcription API rename; removes `backoff` transitive dep)
- Refactor: deduplicated test database setup across common/src/storage/. - Refactor: deduplicated test database setup across common/src/storage/.
- Refactor: split knowledge-graph.js monolith into focused functions. - Refactor: split knowledge-graph.js monolith into focused functions.
- Evaluations: simplified crate layout — linear pipeline, sharded-only converted store, in-memory ingestion, `db/` and `cli/` modules; namespace reuse state in corpus manifest (removed `cache/snapshots/`); no legacy JSON/history compatibility (re-run `--warm` after upgrade) - Evaluations: simplified crate layout — linear pipeline, sharded-only converted store, in-memory ingestion, `db/` and `cli/` modules; namespace reuse state in corpus manifest (removed `cache/snapshots/`); no legacy JSON/history compatibility (re-run `--warm` after upgrade)
Generated
+222 -73
View File
@@ -453,35 +453,37 @@ dependencies = [
[[package]] [[package]]
name = "async-openai" name = "async-openai"
version = "0.29.6" version = "0.41.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c58fd812d4b7152e0f748254c03927f27126a5d83fccf265b2baddaaa1aeea41" checksum = "3007014661d5b98168b7b6f1014147bce8b1362a194783543eeb9f6117a20be9"
dependencies = [ dependencies = [
"async-openai-macros", "async-openai-macros",
"backoff",
"base64 0.22.1", "base64 0.22.1",
"bytes", "bytes",
"derive_builder", "derive_builder",
"eventsource-stream", "eventsource-stream",
"futures", "futures",
"getrandom 0.3.4",
"rand 0.9.2", "rand 0.9.2",
"reqwest", "reqwest 0.13.4",
"reqwest-eventsource",
"secrecy", "secrecy",
"serde", "serde",
"serde_json", "serde_json",
"serde_urlencoded",
"thiserror 2.0.18", "thiserror 2.0.18",
"tokio", "tokio",
"tokio-stream", "tokio-stream",
"tokio-util", "tokio-util",
"tower",
"tracing", "tracing",
"url",
] ]
[[package]] [[package]]
name = "async-openai-macros" name = "async-openai-macros"
version = "0.1.1" version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "81872a8e595e8ceceab71c6ba1f9078e313b452a1e31934e6763ef5d308705e4" checksum = "492a944774207eed3acf425214eadbd6ce84a2b89331164ff1c11bae92b26302"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
@@ -606,6 +608,28 @@ version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8"
[[package]]
name = "aws-lc-rs"
version = "1.17.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5ec2f1fc3ec205783a5da9a7e6c1509cc69dedf09a1949e412c1e18469326d00"
dependencies = [
"aws-lc-sys",
"zeroize",
]
[[package]]
name = "aws-lc-sys"
version = "0.41.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1a2f9779ce85b93ab6170dd940ad0169b5766ff848247aff13bb788b832fe3f4"
dependencies = [
"cc",
"cmake",
"dunce",
"fs_extra",
]
[[package]] [[package]]
name = "axum" name = "axum"
version = "0.8.8" version = "0.8.8"
@@ -683,9 +707,9 @@ dependencies = [
[[package]] [[package]]
name = "axum_session" name = "axum_session"
version = "0.16.0" version = "0.18.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9cbd59ac11f92412bd86308ce6c9d579e4a6ab627a2c7074afa5e4ef7144900d" checksum = "7815c0f6c12768f5f1fb1f1340d21c8b3ce9139bb0b8eb07a211b30f85fa1d50"
dependencies = [ dependencies = [
"aes-gcm", "aes-gcm",
"async-trait", "async-trait",
@@ -700,7 +724,7 @@ dependencies = [
"hmac", "hmac",
"http", "http",
"http-body", "http-body",
"rand 0.8.5", "rand 0.9.2",
"serde", "serde",
"serde_json", "serde_json",
"sha2", "sha2",
@@ -714,9 +738,9 @@ dependencies = [
[[package]] [[package]]
name = "axum_session_auth" name = "axum_session_auth"
version = "0.16.0" version = "0.18.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b7302ab5019fe9d4138d91647205ca1f69c54211df7491847f4117efe91d473e" checksum = "30ce1f03d6a0649a4ecb34a26f044a2d0bc0a38afcb5b413de1346549e835132"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"async-recursion", "async-recursion",
@@ -738,13 +762,14 @@ dependencies = [
[[package]] [[package]]
name = "axum_session_surreal" name = "axum_session_surreal"
version = "0.4.0" version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6e438a543bd3ebc957fd6c4fbad0b00b481e6477e88a9ea349e7584e65656b58" checksum = "746ea7d3e931122129ca70c2eb3a1b5f4c6b7d32a2d0c1b0be4099a3fda2d30e"
dependencies = [ dependencies = [
"async-trait", "async-trait",
"axum_session", "axum_session",
"chrono", "chrono",
"serde",
"surrealdb", "surrealdb",
] ]
@@ -783,20 +808,6 @@ dependencies = [
"ubyte", "ubyte",
] ]
[[package]]
name = "backoff"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b62ddb9cb1ec0a098ad4bbf9344d0713fa193ae1a80af55febcff2627b6a00c1"
dependencies = [
"futures-core",
"getrandom 0.2.17",
"instant",
"pin-project-lite",
"rand 0.8.5",
"tokio",
]
[[package]] [[package]]
name = "backtrace" name = "backtrace"
version = "0.3.76" version = "0.3.76"
@@ -1303,6 +1314,15 @@ dependencies = [
"syn 2.0.115", "syn 2.0.115",
] ]
[[package]]
name = "cmake"
version = "0.1.58"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c0f78a02292a74a88ac736019ab962ece0bc380e3f977bf72e376c5d78ff0678"
dependencies = [
"cc",
]
[[package]] [[package]]
name = "color-eyre" name = "color-eyre"
version = "0.6.5" version = "0.6.5"
@@ -1336,6 +1356,16 @@ version = "1.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75" checksum = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75"
[[package]]
name = "combine"
version = "4.6.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ba5a308b75df32fe02788e748662718f03fde005016435c444eea572398219fd"
dependencies = [
"bytes",
"memchr",
]
[[package]] [[package]]
name = "common" name = "common"
version = "0.1.0" version = "0.1.0"
@@ -1363,7 +1393,7 @@ dependencies = [
"minijinja-contrib", "minijinja-contrib",
"minijinja-embed", "minijinja-embed",
"object_store 0.11.2", "object_store 0.11.2",
"reqwest", "reqwest 0.12.28",
"serde", "serde",
"serde_json", "serde_json",
"sha2", "sha2",
@@ -2068,6 +2098,12 @@ dependencies = [
"dtoa", "dtoa",
] ]
[[package]]
name = "dunce"
version = "1.0.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813"
[[package]] [[package]]
name = "dyn-clone" name = "dyn-clone"
version = "1.0.20" version = "1.0.20"
@@ -2495,12 +2531,6 @@ version = "0.3.31"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988"
[[package]]
name = "futures-timer"
version = "3.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f288b0a4f20f9a56b5d1da57e2227c661b7b16168e2f72365f57b63326e29b24"
[[package]] [[package]]
name = "futures-util" name = "futures-util"
version = "0.3.31" version = "0.3.31"
@@ -2885,7 +2915,7 @@ dependencies = [
"log", "log",
"native-tls", "native-tls",
"rand 0.9.2", "rand 0.9.2",
"reqwest", "reqwest 0.12.28",
"serde", "serde",
"serde_json", "serde_json",
"thiserror 2.0.18", "thiserror 2.0.18",
@@ -3329,7 +3359,7 @@ dependencies = [
"headless_chrome", "headless_chrome",
"lopdf 0.32.0", "lopdf 0.32.0",
"pdf-extract", "pdf-extract",
"reqwest", "reqwest 0.12.28",
"retrieval-pipeline", "retrieval-pipeline",
"serde", "serde",
"serde_json", "serde_json",
@@ -3387,15 +3417,6 @@ dependencies = [
"tempfile", "tempfile",
] ]
[[package]]
name = "instant"
version = "0.1.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222"
dependencies = [
"cfg-if",
]
[[package]] [[package]]
name = "ipnet" name = "ipnet"
version = "2.11.0" version = "2.11.0"
@@ -3486,6 +3507,55 @@ version = "1.0.17"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "92ecc6618181def0457392ccd0ee51198e065e016d1d527a7ac1b6dc7c1f09d2" checksum = "92ecc6618181def0457392ccd0ee51198e065e016d1d527a7ac1b6dc7c1f09d2"
[[package]]
name = "jni"
version = "0.22.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5efd9a482cf3a427f00d6b35f14332adc7902ce91efb778580e180ff90fa3498"
dependencies = [
"cfg-if",
"combine",
"jni-macros",
"jni-sys",
"log",
"simd_cesu8",
"thiserror 2.0.18",
"walkdir",
"windows-link",
]
[[package]]
name = "jni-macros"
version = "0.22.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a00109accc170f0bdb141fed3e393c565b6f5e072365c3bd58f5b062591560a3"
dependencies = [
"proc-macro2",
"quote",
"rustc_version",
"simd_cesu8",
"syn 2.0.115",
]
[[package]]
name = "jni-sys"
version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c6377a88cb3910bee9b0fa88d4f42e1d2da8e79915598f65fb0c7ee14c878af2"
dependencies = [
"jni-sys-macros",
]
[[package]]
name = "jni-sys-macros"
version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "38c0b942f458fe50cdac086d2f946512305e5631e720728f2a61aabcd47a6264"
dependencies = [
"quote",
"syn 2.0.115",
]
[[package]] [[package]]
name = "jobserver" name = "jobserver"
version = "0.1.34" version = "0.1.34"
@@ -4056,15 +4126,6 @@ dependencies = [
"version_check", "version_check",
] ]
[[package]]
name = "nanoid"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3ffa00dec017b5b1a8b7cf5e2c008bfda1aa7e0697ac1508b491fdf2622fb4d8"
dependencies = [
"rand 0.8.5",
]
[[package]] [[package]]
name = "native-tls" name = "native-tls"
version = "0.2.16" version = "0.2.16"
@@ -4319,7 +4380,7 @@ dependencies = [
"percent-encoding", "percent-encoding",
"quick-xml", "quick-xml",
"rand 0.8.5", "rand 0.8.5",
"reqwest", "reqwest 0.12.28",
"ring", "ring",
"serde", "serde",
"serde_json", "serde_json",
@@ -5020,6 +5081,7 @@ version = "0.11.14"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "434b42fec591c96ef50e21e886936e66d3cc3f737104fdb9b737c40ffb94c098" checksum = "434b42fec591c96ef50e21e886936e66d3cc3f737104fdb9b737c40ffb94c098"
dependencies = [ dependencies = [
"aws-lc-rs",
"bytes", "bytes",
"getrandom 0.3.4", "getrandom 0.3.4",
"lru-slab", "lru-slab",
@@ -5339,25 +5401,51 @@ dependencies = [
"url", "url",
"wasm-bindgen", "wasm-bindgen",
"wasm-bindgen-futures", "wasm-bindgen-futures",
"wasm-streams", "wasm-streams 0.4.2",
"web-sys", "web-sys",
"webpki-roots 1.0.6", "webpki-roots 1.0.6",
] ]
[[package]] [[package]]
name = "reqwest-eventsource" name = "reqwest"
version = "0.6.0" version = "0.13.4"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "632c55746dbb44275691640e7b40c907c16a2dc1a5842aa98aaec90da6ec6bde" checksum = "219c5811de6525e5416c7d5d53bb656d3afdbc6c5af816e0802bcfa42dbdc1c3"
dependencies = [ dependencies = [
"eventsource-stream", "base64 0.22.1",
"bytes",
"futures-core", "futures-core",
"futures-timer", "futures-util",
"mime", "http",
"nom 7.1.3", "http-body",
"http-body-util",
"hyper",
"hyper-rustls",
"hyper-util",
"js-sys",
"log",
"mime_guess",
"percent-encoding",
"pin-project-lite", "pin-project-lite",
"reqwest", "quinn",
"thiserror 1.0.69", "rustls",
"rustls-pki-types",
"rustls-platform-verifier",
"serde",
"serde_json",
"serde_urlencoded",
"sync_wrapper",
"tokio",
"tokio-rustls",
"tokio-util",
"tower",
"tower-http",
"tower-service",
"url",
"wasm-bindgen",
"wasm-bindgen-futures",
"wasm-streams 0.5.0",
"web-sys",
] ]
[[package]] [[package]]
@@ -5670,6 +5758,7 @@ version = "0.23.36"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c665f33d38cea657d9614f766881e4d510e0eda4239891eea56b4cadcf01801b" checksum = "c665f33d38cea657d9614f766881e4d510e0eda4239891eea56b4cadcf01801b"
dependencies = [ dependencies = [
"aws-lc-rs",
"log", "log",
"once_cell", "once_cell",
"ring", "ring",
@@ -5701,12 +5790,40 @@ dependencies = [
"zeroize", "zeroize",
] ]
[[package]]
name = "rustls-platform-verifier"
version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "26d1e2536ce4f35f4846aa13bff16bd0ff40157cdb14cc056c7b14ba41233ba0"
dependencies = [
"core-foundation 0.10.1",
"core-foundation-sys",
"jni",
"log",
"once_cell",
"rustls",
"rustls-native-certs",
"rustls-platform-verifier-android",
"rustls-webpki",
"security-framework",
"security-framework-sys",
"webpki-root-certs",
"windows-sys 0.61.2",
]
[[package]]
name = "rustls-platform-verifier-android"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f87165f0995f63a9fbeea62b64d10b4d9d8e78ec6d7d51fb2125fda7bb36788f"
[[package]] [[package]]
name = "rustls-webpki" name = "rustls-webpki"
version = "0.103.13" version = "0.103.13"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "61c429a8649f110dddef65e2a5ad240f747e85f7758a6bccc7e5777bd33f756e" checksum = "61c429a8649f110dddef65e2a5ad240f747e85f7758a6bccc7e5777bd33f756e"
dependencies = [ dependencies = [
"aws-lc-rs",
"ring", "ring",
"rustls-pki-types", "rustls-pki-types",
"untrusted", "untrusted",
@@ -6099,6 +6216,16 @@ version = "0.3.8"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e320a6c5ad31d271ad523dcf3ad13e2767ad8b1cb8f047f75a8aeaf8da139da2" checksum = "e320a6c5ad31d271ad523dcf3ad13e2767ad8b1cb8f047f75a8aeaf8da139da2"
[[package]]
name = "simd_cesu8"
version = "1.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "94f90157bb87cddf702797c5dadfa0be7d266cdf49e22da2fcaa32eff75b2c33"
dependencies = [
"rustc_version",
"simdutf8",
]
[[package]] [[package]]
name = "simdutf8" name = "simdutf8"
version = "0.1.5" version = "0.1.5"
@@ -6413,9 +6540,9 @@ dependencies = [
[[package]] [[package]]
name = "surrealdb" name = "surrealdb"
version = "2.6.1" version = "2.6.5"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "085478c61364d88ad875a772944feefaba9f0fa24ddd12917f138ef23926ca94" checksum = "3429154a8b5a98ca39100ba45ef49ae046fb1d0869dff78d78a2670b1b278982"
dependencies = [ dependencies = [
"arrayvec", "arrayvec",
"async-channel", "async-channel",
@@ -6429,7 +6556,7 @@ dependencies = [
"path-clean", "path-clean",
"pharos", "pharos",
"reblessive", "reblessive",
"reqwest", "reqwest 0.12.28",
"revision 0.11.0", "revision 0.11.0",
"ring", "ring",
"rust_decimal", "rust_decimal",
@@ -6455,9 +6582,9 @@ dependencies = [
[[package]] [[package]]
name = "surrealdb-core" name = "surrealdb-core"
version = "2.6.1" version = "2.6.5"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "87283061150fee74fc5e8be99495560b0bd11bc32db36412297544c73843c5c0" checksum = "ba423d9e7e665e4c735a1d4669c3a067135e4a574edf88af215f7f2b815e70ed"
dependencies = [ dependencies = [
"addr", "addr",
"affinitypool", "affinitypool",
@@ -6495,7 +6622,6 @@ dependencies = [
"lexicmp 0.1.0", "lexicmp 0.1.0",
"linfa-linalg", "linfa-linalg",
"md-5", "md-5",
"nanoid",
"ndarray 0.15.6", "ndarray 0.15.6",
"ndarray-stats", "ndarray-stats",
"num-traits", "num-traits",
@@ -6512,7 +6638,7 @@ dependencies = [
"rayon", "rayon",
"reblessive", "reblessive",
"regex", "regex",
"reqwest", "reqwest 0.12.28",
"revision 0.11.0", "revision 0.11.0",
"ring", "ring",
"rmpv", "rmpv",
@@ -7091,6 +7217,7 @@ dependencies = [
"pin-project-lite", "pin-project-lite",
"sync_wrapper", "sync_wrapper",
"tokio", "tokio",
"tokio-util",
"tower-layer", "tower-layer",
"tower-service", "tower-service",
"tracing", "tracing",
@@ -7711,6 +7838,19 @@ dependencies = [
"web-sys", "web-sys",
] ]
[[package]]
name = "wasm-streams"
version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9d1ec4f6517c9e11ae630e200b2b65d193279042e28edd4a2cda233e46670bbb"
dependencies = [
"futures-util",
"js-sys",
"wasm-bindgen",
"wasm-bindgen-futures",
"web-sys",
]
[[package]] [[package]]
name = "wasmparser" name = "wasmparser"
version = "0.244.0" version = "0.244.0"
@@ -7768,6 +7908,15 @@ dependencies = [
"string_cache_codegen", "string_cache_codegen",
] ]
[[package]]
name = "webpki-root-certs"
version = "1.0.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0d46a5a140e6f7afeccd8eae97eff335163939eac8b929834875168b29b3d267"
dependencies = [
"rustls-pki-types",
]
[[package]] [[package]]
name = "webpki-roots" name = "webpki-roots"
version = "0.26.11" version = "0.26.11"
+6 -6
View File
@@ -13,13 +13,13 @@ resolver = "3"
[workspace.dependencies] [workspace.dependencies]
anyhow = "1.0.94" anyhow = "1.0.94"
async-openai = "0.29.3" async-openai = { version = "0.41.1", features = ["chat-completion", "embedding", "audio", "model"] }
async-stream = "0.3.6" async-stream = "0.3.6"
async-trait = "0.1.88" async-trait = "0.1.88"
axum-htmx = "0.7.0" axum-htmx = "0.7.0"
axum_session = "0.16" axum_session = "0.18"
axum_session_auth = "0.16" axum_session_auth = "0.18"
axum_session_surreal = "0.4" axum_session_surreal = "0.6"
axum_typed_multipart = "0.16" axum_typed_multipart = "0.16"
axum = { version = "0.8", features = ["multipart", "macros"] } axum = { version = "0.8", features = ["multipart", "macros"] }
chrono-tz = "0.10.1" chrono-tz = "0.10.1"
@@ -39,8 +39,8 @@ reqwest = {version = "0.12.12", features = ["charset", "json"]}
serde_json = "1.0.128" serde_json = "1.0.128"
serde = { version = "1", features = ["derive"] } serde = { version = "1", features = ["derive"] }
sha2 = "0.10.8" sha2 = "0.10.8"
surrealdb-migrations = "2.2.2" surrealdb-migrations = "2.4.0"
surrealdb = { version = "2" } surrealdb = { version = "2.6" }
tempfile = "3.12.0" tempfile = "3.12.0"
text-splitter = { version = "0.18.1", features = ["markdown", "tokenizers"] } text-splitter = { version = "0.18.1", features = ["markdown", "tokenizers"] }
tokenizers = { version = "0.20.4", features = ["http"] } tokenizers = { version = "0.20.4", features = ["http"] }
+1 -1
View File
@@ -9,7 +9,7 @@ use std::{
use serde::Serialize; use serde::Serialize;
use tracing::warn; use tracing::warn;
use async_openai::{types::CreateEmbeddingRequestArgs, Client}; use async_openai::{types::embeddings::CreateEmbeddingRequestArgs, Client};
use fastembed::{EmbeddingModel, ModelTrait, TextEmbedding, TextInitOptions}; use fastembed::{EmbeddingModel, ModelTrait, TextEmbedding, TextInitOptions};
use tokio::sync::{OwnedSemaphorePermit, Semaphore}; use tokio::sync::{OwnedSemaphorePermit, Semaphore};
+3 -3
View File
@@ -958,9 +958,9 @@
"license": "ISC" "license": "ISC"
}, },
"node_modules/picomatch": { "node_modules/picomatch": {
"version": "2.3.1", "version": "2.3.2",
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.2.tgz",
"integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", "integrity": "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==",
"license": "MIT", "license": "MIT",
"engines": { "engines": {
"node": ">=8.6" "node": ">=8.6"
+1 -1
View File
@@ -1,4 +1,4 @@
use async_openai::types::ListModelResponse; use async_openai::types::models::ListModelResponse;
use axum::{ use axum::{
extract::{Query, State}, extract::{Query, State},
Form, Form,
@@ -234,7 +234,7 @@ fn build_chat_event_stream(
state: HtmlState, state: HtmlState,
openai_stream: impl Stream< openai_stream: impl Stream<
Item = Result< Item = Result<
async_openai::types::CreateChatCompletionStreamResponse, async_openai::types::chat::CreateChatCompletionStreamResponse,
async_openai::error::OpenAIError, async_openai::error::OpenAIError,
>, >,
> + Send > + Send
@@ -342,7 +342,7 @@ async fn prepare_chat_request(
history: &[Message], history: &[Message],
) -> Result< ) -> Result<
( (
async_openai::types::CreateChatCompletionRequest, async_openai::types::chat::CreateChatCompletionRequest,
Vec<String>, Vec<String>,
), ),
SseResponse, SseResponse,
+5 -5
View File
@@ -3,7 +3,7 @@ use std::{
sync::{Arc, OnceLock}, sync::{Arc, OnceLock},
}; };
use async_openai::types::{ use async_openai::types::chat::{
ChatCompletionRequestSystemMessage, ChatCompletionRequestUserMessage, ChatCompletionRequestSystemMessage, ChatCompletionRequestUserMessage,
CreateChatCompletionRequest, CreateChatCompletionRequestArgs, ResponseFormat, CreateChatCompletionRequest, CreateChatCompletionRequestArgs, ResponseFormat,
ResponseFormatJsonSchema, ResponseFormatJsonSchema,
@@ -111,7 +111,7 @@ impl DefaultPipelineServices {
json_schema: ResponseFormatJsonSchema { json_schema: ResponseFormatJsonSchema {
description: Some("Structured analysis of the submitted content".into()), description: Some("Structured analysis of the submitted content".into()),
name: "content_analysis".into(), name: "content_analysis".into(),
schema: Some(get_ingress_analysis_schema()), schema: get_ingress_analysis_schema(),
strict: Some(true), strict: Some(true),
}, },
}; };
@@ -358,7 +358,7 @@ mod tests {
use std::sync::Arc; use std::sync::Arc;
use anyhow::Context; use anyhow::Context;
use async_openai::{config::OpenAIConfig, types::ChatCompletionRequestMessage, Client}; use async_openai::{config::OpenAIConfig, types::chat::ChatCompletionRequestMessage, Client};
use common::{ use common::{
storage::{ storage::{
db::SurrealDbClient, store::StorageManager, types::system_settings::SystemSettingsPatch, db::SurrealDbClient, store::StorageManager, types::system_settings::SystemSettingsPatch,
@@ -375,12 +375,12 @@ mod tests {
use common::error::AppError; use common::error::AppError;
fn system_prompt_from_request( fn system_prompt_from_request(
request: &async_openai::types::CreateChatCompletionRequest, request: &async_openai::types::chat::CreateChatCompletionRequest,
) -> anyhow::Result<String> { ) -> anyhow::Result<String> {
let Some(ChatCompletionRequestMessage::System(system)) = request.messages.first() else { let Some(ChatCompletionRequestMessage::System(system)) = request.messages.first() else {
anyhow::bail!("expected first message to be system"); anyhow::bail!("expected first message to be system");
}; };
let async_openai::types::ChatCompletionRequestSystemMessageContent::Text(text) = let async_openai::types::chat::ChatCompletionRequestSystemMessageContent::Text(text) =
&system.content &system.content
else { else {
anyhow::bail!("unexpected system message content: {:?}", system.content); anyhow::bail!("unexpected system message content: {:?}", system.content);
@@ -1,4 +1,4 @@
use async_openai::types::{AudioResponseFormat, CreateTranscriptionRequestArgs}; use async_openai::types::audio::{AudioResponseFormat, CreateTranscriptionRequestArgs};
use common::{ use common::{
error::AppError, error::AppError,
storage::{db::SurrealDbClient, types::system_settings::SystemSettings}, storage::{db::SurrealDbClient, types::system_settings::SystemSettings},
@@ -21,7 +21,8 @@ pub async fn transcribe_audio_file(
let response = openai_client let response = openai_client
.audio() .audio()
.transcribe(request) .transcription()
.create(request)
.await .await
.map_err(|e| AppError::Processing(format!("Audio transcription failed: {e}")))?; .map_err(|e| AppError::Processing(format!("Audio transcription failed: {e}")))?;
Ok(response.text) Ok(response.text)
@@ -1,4 +1,4 @@
use async_openai::types::{ use async_openai::types::chat::{
ChatCompletionRequestMessageContentPartImageArgs, ChatCompletionRequestMessageContentPartImageArgs,
ChatCompletionRequestMessageContentPartTextArgs, ChatCompletionRequestUserMessageArgs, ChatCompletionRequestMessageContentPartTextArgs, ChatCompletionRequestUserMessageArgs,
CreateChatCompletionRequestArgs, ImageDetail, ImageUrlArgs, CreateChatCompletionRequestArgs, ImageDetail, ImageUrlArgs,
+1 -1
View File
@@ -1,6 +1,6 @@
//! Vision-LLM transcription of rendered PDF pages into Markdown. //! Vision-LLM transcription of rendered PDF pages into Markdown.
use async_openai::types::{ use async_openai::types::chat::{
ChatCompletionRequestMessageContentPartImageArgs, ChatCompletionRequestMessageContentPartImageArgs,
ChatCompletionRequestMessageContentPartTextArgs, ChatCompletionRequestUserMessageArgs, ChatCompletionRequestMessageContentPartTextArgs, ChatCompletionRequestUserMessageArgs,
CreateChatCompletionRequest, CreateChatCompletionRequestArgs, ImageDetail, ImageUrlArgs, CreateChatCompletionRequest, CreateChatCompletionRequestArgs, ImageDetail, ImageUrlArgs,
+2 -2
View File
@@ -2,7 +2,7 @@
use async_openai::{ use async_openai::{
error::OpenAIError, error::OpenAIError,
types::{ types::chat::{
ChatCompletionRequestSystemMessage, ChatCompletionRequestUserMessage, ChatCompletionRequestSystemMessage, ChatCompletionRequestUserMessage,
CreateChatCompletionRequest, CreateChatCompletionRequestArgs, ResponseFormat, CreateChatCompletionRequest, CreateChatCompletionRequestArgs, ResponseFormat,
ResponseFormatJsonSchema, ResponseFormatJsonSchema,
@@ -107,7 +107,7 @@ pub fn create_chat_request(
json_schema: ResponseFormatJsonSchema { json_schema: ResponseFormatJsonSchema {
description: Some("Query answering AI".into()), description: Some("Query answering AI".into()),
name: "query_answering_with_uuids".into(), name: "query_answering_with_uuids".into(),
schema: Some(get_query_response_schema()), schema: get_query_response_schema(),
strict: Some(true), strict: Some(true),
}, },
}; };