litellm/litellm-rust/crates/token-counter/Cargo.toml
Devin AI a0446e9e47 feat(tokenize): add native local tokenizer backend
Co-authored-by: Ishaan <ishaan@berri.ai>
2026-10-23 22:26:11 +00:00

42 lines
1.1 KiB
TOML

[package]
name = "litellm-token-counter"
version = "0.1.0"
edition.workspace = true
license.workspace = true
repository.workspace = true
[features]
default = ["fast", "huggingface", "tiktoken"]
fast = ["dep:litellm-token-counter-fast"]
huggingface = ["dep:litellm-token-counter-huggingface"]
tiktoken = ["dep:litellm-token-counter-tiktoken"]
[dependencies]
indexmap = { version = "2.14.0", features = ["serde"] }
itoa = "1.0"
litellm-token-counter-fast = { workspace = true, optional = true }
litellm-token-counter-huggingface = { workspace = true, optional = true }
litellm-token-counter-tiktoken = { workspace = true, optional = true }
serde.workspace = true
serde_json.workspace = true
sha2.workspace = true
strum.workspace = true
thiserror.workspace = true
[dev-dependencies]
base64.workspace = true
criterion.workspace = true
rand.workspace = true
rstest.workspace = true
tempfile.workspace = true
tokenizers.workspace = true
[[bench]]
name = "token_counter"
harness = false
required-features = ["fast"]
[[bench]]
name = "allocations"
harness = false
required-features = ["fast"]