diff --git a/Cargo.lock b/Cargo.lock index f5248259..5c64b43e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3057,6 +3057,17 @@ dependencies = [ "num-traits", ] +[[package]] +name = "outlines-core" +version = "0.1.0" +source = "git+https://github.com/dottxt-ai/outlines-core.git?rev=ba10c619fc9bf3c487e43f49bdecb95a24bb465c#ba10c619fc9bf3c487e43f49bdecb95a24bb465c" +dependencies = [ + "anyhow", + "regex", + "serde-pyobject", + "serde_json", +] + [[package]] name = "overload" version = "0.1.1" @@ -4004,6 +4015,16 @@ dependencies = [ "serde_derive", ] +[[package]] +name = "serde-pyobject" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca4b0aad8b225845739a0030a0d5cc2ae949c56a86a7daf9226c7df7c2016d16" +dependencies = [ + "pyo3", + "serde", +] + [[package]] name = "serde_cbor" version = "0.11.2" @@ -4031,6 +4052,7 @@ version = "1.0.133" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c7fceb2473b9166b2294ef05efcb65a3db80803f0b03ef86a5fc88a2b85ee377" dependencies = [ + "indexmap 2.6.0", "itoa", "memchr", "ryu", @@ -4479,6 +4501,7 @@ dependencies = [ name = "text-generation-router" version = "3.0.2-dev0" dependencies = [ + "anyhow", "async-stream", "async-trait", "axum 0.7.9", @@ -4504,6 +4527,7 @@ dependencies = [ "once_cell", "opentelemetry 0.20.0", "opentelemetry-otlp", + "outlines-core", "pyo3", "rand", "regex", diff --git a/router/Cargo.toml b/router/Cargo.toml index 151d1e87..c98db86f 100644 --- a/router/Cargo.toml +++ b/router/Cargo.toml @@ -8,13 +8,13 @@ authors.workspace = true homepage.workspace = true [dependencies] -ffmpeg-next = "7.1.0" -tempfile = "3.10.1" +anyhow = "1" async-trait = "0.1.74" async-stream = "0.3.5" axum = { version = "0.7", features = ["json"] } axum-tracing-opentelemetry = "0.16" clap = { version = "4.4.5", features = ["derive", "env"] } +ffmpeg-next = "7.1.0" futures = "0.3.28" hf-hub = { workspace = true } itertools = "0.10" @@ -23,11 +23,13 @@ metrics = { workspace = true } metrics-exporter-prometheus = { workspace = true } nohash-hasher = "0.2.0" opentelemetry = { version = "0.20.0", features = ["rt-tokio"] } +outlines-core = { git = "https://github.com/dottxt-ai/outlines-core.git", rev = "ba10c619fc9bf3c487e43f49bdecb95a24bb465c" } opentelemetry-otlp = "0.13.0" rand = "0.8.5" reqwest = { version = "0.11.20", features = [] } serde = "1.0.188" serde_json = "1.0.107" +tempfile = "3.10.1" thiserror = "1.0.48" tokenizers = { workspace = true } tokio = { version = "1.32.0", features = [