114 lines
2.7 KiB
TOML
114 lines
2.7 KiB
TOML
|
|
[package]
|
||
|
|
name = "stratum-embeddings"
|
||
|
|
version = "0.1.0"
|
||
|
|
edition.workspace = true
|
||
|
|
description = "Unified embedding providers with caching, batch processing, and vector storage"
|
||
|
|
license.workspace = true
|
||
|
|
|
||
|
|
[dependencies]
|
||
|
|
# Async runtime
|
||
|
|
tokio = { workspace = true }
|
||
|
|
async-trait = { workspace = true }
|
||
|
|
futures = { workspace = true }
|
||
|
|
|
||
|
|
# HTTP client (for cloud providers)
|
||
|
|
reqwest = { workspace = true, optional = true }
|
||
|
|
|
||
|
|
# Serialization
|
||
|
|
serde = { workspace = true }
|
||
|
|
serde_json = { workspace = true }
|
||
|
|
humantime-serde = { workspace = true }
|
||
|
|
|
||
|
|
# Caching
|
||
|
|
moka = { workspace = true }
|
||
|
|
|
||
|
|
# Persistent cache (optional)
|
||
|
|
sled = { workspace = true, optional = true }
|
||
|
|
|
||
|
|
# Local embeddings
|
||
|
|
fastembed = { workspace = true, optional = true }
|
||
|
|
|
||
|
|
# Vector storage backends
|
||
|
|
lancedb = { workspace = true, optional = true }
|
||
|
|
surrealdb = { workspace = true, optional = true }
|
||
|
|
arrow = { workspace = true, optional = true }
|
||
|
|
|
||
|
|
# Error handling
|
||
|
|
thiserror = { workspace = true }
|
||
|
|
|
||
|
|
# Logging
|
||
|
|
tracing = { workspace = true }
|
||
|
|
|
||
|
|
# Metrics
|
||
|
|
prometheus = { workspace = true, optional = true }
|
||
|
|
|
||
|
|
# Utilities
|
||
|
|
xxhash-rust = { workspace = true }
|
||
|
|
|
||
|
|
[features]
|
||
|
|
default = ["fastembed-provider", "memory-cache"]
|
||
|
|
|
||
|
|
# Providers
|
||
|
|
fastembed-provider = ["fastembed"]
|
||
|
|
openai-provider = ["reqwest"]
|
||
|
|
ollama-provider = ["reqwest"]
|
||
|
|
cohere-provider = ["reqwest"]
|
||
|
|
voyage-provider = ["reqwest"]
|
||
|
|
huggingface-provider = ["reqwest"]
|
||
|
|
all-providers = [
|
||
|
|
"fastembed-provider",
|
||
|
|
"openai-provider",
|
||
|
|
"ollama-provider",
|
||
|
|
"cohere-provider",
|
||
|
|
"voyage-provider",
|
||
|
|
"huggingface-provider",
|
||
|
|
]
|
||
|
|
|
||
|
|
# Cache backends
|
||
|
|
memory-cache = []
|
||
|
|
persistent-cache = ["sled"]
|
||
|
|
all-cache = ["memory-cache", "persistent-cache"]
|
||
|
|
|
||
|
|
# Vector storage backends
|
||
|
|
lancedb-store = ["lancedb", "arrow"]
|
||
|
|
surrealdb-store = ["surrealdb"]
|
||
|
|
all-stores = ["lancedb-store", "surrealdb-store"]
|
||
|
|
|
||
|
|
# Observability
|
||
|
|
metrics = ["prometheus"]
|
||
|
|
|
||
|
|
# Project-specific presets
|
||
|
|
kogral = ["fastembed-provider", "memory-cache", "surrealdb-store"]
|
||
|
|
provisioning = ["openai-provider", "memory-cache", "lancedb-store"]
|
||
|
|
vapora = ["all-providers", "memory-cache", "lancedb-store"] # Includes huggingface-provider
|
||
|
|
|
||
|
|
# Full feature set
|
||
|
|
full = ["all-providers", "all-cache", "all-stores", "metrics"]
|
||
|
|
|
||
|
|
[dev-dependencies]
|
||
|
|
tokio-test = { workspace = true }
|
||
|
|
approx = { workspace = true }
|
||
|
|
tempfile = { workspace = true }
|
||
|
|
tracing-subscriber = { workspace = true }
|
||
|
|
|
||
|
|
# Example-specific feature requirements
|
||
|
|
[[example]]
|
||
|
|
name = "basic_usage"
|
||
|
|
required-features = ["fastembed-provider"]
|
||
|
|
|
||
|
|
[[example]]
|
||
|
|
name = "fallback_demo"
|
||
|
|
required-features = ["ollama-provider", "fastembed-provider"]
|
||
|
|
|
||
|
|
[[example]]
|
||
|
|
name = "lancedb_usage"
|
||
|
|
required-features = ["lancedb-store", "fastembed-provider"]
|
||
|
|
|
||
|
|
[[example]]
|
||
|
|
name = "surrealdb_usage"
|
||
|
|
required-features = ["surrealdb-store", "fastembed-provider"]
|
||
|
|
|
||
|
|
[[example]]
|
||
|
|
name = "huggingface_usage"
|
||
|
|
required-features = ["huggingface-provider"]
|