[package]
name = "api_xai"
version = "0.3.0"
edition = "2021"
authors = [
"Kostiantyn Wandalen <wandalen@obox.systems>",
]
license = "MIT"
readme = "readme.md"
documentation = "https://docs.rs/api_xai"
repository = "https://github.com/Wandalen/api_llm/tree/master/api/xai"
homepage = "https://github.com/Wandalen/api_llm/tree/master/api/xai"
description = """
X.AI Grok API client for accessing large language models (LLMs).
"""
categories = [ "algorithms", "development-tools" ]
keywords = [ "fundamental", "general-purpose", "xai", "grok", "ai" ]
[lints]
workspace = true
[package.metadata.docs.rs]
features = [ "full" ]
all-features = false
[features]
default = [ "full" ]
full = [
"enabled",
"integration",
"streaming",
"tool_calling",
"retry",
"circuit_breaker",
"rate_limiting",
"failover",
"enhanced_tools",
"health_checks",
"structured_logging",
"count_tokens",
"caching",
"input_validation",
"curl_diagnostics",
"batch_operations",
"performance_metrics",
"sync_api",
]
enabled = [
"dep:mod_interface",
"dep:error_tools",
"dep:workspace_tools",
"dep:serde",
"dep:serde_json",
"dep:secrecy",
"dep:former",
"dep:futures-core",
"dep:futures-util",
"dep:tokio",
"dep:reqwest",
"dep:url",
]
integration = []
streaming = [ "dep:eventsource-stream", "dep:bytes" ]
tool_calling = []
retry = []
circuit_breaker = []
rate_limiting = [ "tokio/time" ]
failover = []
enhanced_tools = []
health_checks = []
structured_logging = [ "dep:tracing" ]
count_tokens = [ "dep:tiktoken-rs" ]
caching = [ "dep:lru" ]
input_validation = []
curl_diagnostics = []
batch_operations = [ "tokio/sync" ]
performance_metrics = [ "dep:prometheus" ]
sync_api = [ "tokio/rt-multi-thread" ]
[dependencies]
mod_interface = { workspace = true, optional = true }
error_tools = { workspace = true, optional = true }
workspace_tools = { workspace = true, features = [ "secrets" ], optional = true }
serde = { workspace = true, features = [ "derive" ], optional = true }
serde_json = { workspace = true, optional = true }
secrecy = { workspace = true, optional = true }
former = { workspace = true, optional = true }
futures-core = { workspace = true, optional = true }
futures-util = { workspace = true, optional = true }
tokio = { workspace = true, features = [ "macros" ], optional = true }
reqwest = { workspace = true, features = [ "json", "rustls-tls", "stream" ], default-features = false, optional = true }
url = { workspace = true, optional = true }
eventsource-stream = { workspace = true, optional = true }
bytes = { workspace = true, optional = true }
tracing = { workspace = true, optional = true }
tiktoken-rs = { workspace = true, optional = true }
lru = { workspace = true, optional = true }
prometheus = { workspace = true, optional = true }
[dev-dependencies]
tokio = { workspace = true, features = [ "rt-multi-thread", "macros" ] }
futures-util = { workspace = true }
serde_json = { workspace = true }