[dependencies.bytes]
optional = true
version = "1.10.1"
[dependencies.error_tools]
optional = true
version = "0.35.0"
[dependencies.eventsource-stream]
optional = true
version = "0.2.3"
[dependencies.former]
optional = true
version = "2.37.0"
[dependencies.futures-core]
optional = true
version = "0.3.31"
[dependencies.futures-util]
optional = true
version = "0.3.31"
[dependencies.lru]
optional = true
version = "0.12"
[dependencies.mod_interface]
optional = true
version = "0.52.0"
[dependencies.prometheus]
optional = true
version = "0.13"
[dependencies.reqwest]
default-features = false
features = ["json", "rustls-tls", "stream"]
optional = true
version = "0.12.24"
[dependencies.secrecy]
optional = true
version = "0.10.3"
[dependencies.serde]
features = ["derive"]
optional = true
version = "1.0.228"
[dependencies.serde_json]
optional = true
version = "1.0.145"
[dependencies.tiktoken-rs]
optional = true
version = "0.5"
[dependencies.tokio]
features = ["macros"]
optional = true
version = "1.48.0"
[dependencies.tracing]
optional = true
version = "=0.1.37"
[dependencies.url]
optional = true
version = "2.5.7"
[dependencies.workspace_tools]
features = ["secrets"]
optional = true
version = "0.10.0"
[dev-dependencies.futures-util]
version = "0.3.31"
[dev-dependencies.serde_json]
version = "1.0.145"
[dev-dependencies.tokio]
features = ["rt-multi-thread", "macros"]
version = "1.48.0"
[[example]]
name = "basic_chat"
path = "examples/basic_chat.rs"
[[example]]
name = "cached_interactive_chat"
path = "examples/cached_interactive_chat.rs"
[[example]]
name = "client_side_enhancements"
path = "examples/client_side_enhancements.rs"
[[example]]
name = "enhanced_tools_demo"
path = "examples/enhanced_tools_demo.rs"
[[example]]
name = "enterprise_features"
path = "examples/enterprise_features.rs"
[[example]]
name = "failover_demo"
path = "examples/failover_demo.rs"
[[example]]
name = "interactive_chat"
path = "examples/interactive_chat.rs"
[[example]]
name = "list_models"
path = "examples/list_models.rs"
[[example]]
name = "streaming_chat"
path = "examples/streaming_chat.rs"
[[example]]
name = "tool_calling"
path = "examples/tool_calling.rs"
[features]
batch_operations = ["tokio/sync"]
caching = ["dep:lru"]
circuit_breaker = []
count_tokens = ["dep:tiktoken-rs"]
curl_diagnostics = []
default = ["full"]
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"]
enhanced_tools = []
failover = []
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"]
health_checks = []
input_validation = []
integration = []
performance_metrics = ["dep:prometheus"]
rate_limiting = ["tokio/time"]
retry = []
streaming = ["dep:eventsource-stream", "dep:bytes"]
structured_logging = ["dep:tracing"]
sync_api = ["tokio/rt-multi-thread"]
tool_calling = []
[lib]
name = "api_xai"
path = "src/lib.rs"
[lints.clippy]
absolute_paths = "allow"
arbitrary_source_item_ordering = "allow"
cast_precision_loss = "allow"
doc_include_without_cfg = "warn"
implicit_return = "allow"
inline_always = "allow"
items_after_statements = "allow"
missing_docs_in_private_items = "allow"
missing_inline_in_public_items = "warn"
mod_module_files = "allow"
module_name_repetitions = "allow"
pub_use = "allow"
question_mark_used = "allow"
single_call_fn = "allow"
std_instead_of_alloc = "allow"
std_instead_of_core = "warn"
undocumented_unsafe_blocks = "deny"
wildcard_imports = "allow"
[lints.clippy.pedantic]
level = "warn"
priority = -1
[lints.rust]
missing_debug_implementations = "warn"
missing_docs = "warn"
unsafe-code = "deny"
[lints.rust.future_incompatible]
level = "warn"
priority = -1
[lints.rust.rust_2018_idioms]
level = "warn"
priority = -1
[package]
authors = ["Kostiantyn Wandalen <wandalen@obox.systems>"]
autobenches = false
autobins = false
autoexamples = false
autolib = false
autotests = false
build = false
categories = ["algorithms", "development-tools"]
description = """
X.AI Grok API client for accessing large language models (LLMs).
"""
documentation = "https://docs.rs/api_xai"
edition = "2021"
homepage = "https://github.com/Wandalen/api_llm/tree/master/api/xai"
keywords = ["fundamental", "general-purpose", "xai", "grok", "ai"]
license = "MIT"
name = "api_xai"
readme = "readme.md"
repository = "https://github.com/Wandalen/api_llm/tree/master/api/xai"
version = "0.3.0"
[package.metadata.docs.rs]
all-features = false
features = ["full"]
[[test]]
name = "circuit_breaker_tests"
path = "tests/circuit_breaker_tests.rs"
[[test]]
name = "components_tests"
path = "tests/components_tests.rs"
[[test]]
name = "enhanced_tools_tests"
path = "tests/enhanced_tools_tests.rs"
[[test]]
name = "environment_tests"
path = "tests/environment_tests.rs"
[[test]]
name = "error_tests"
path = "tests/error_tests.rs"
[[test]]
name = "failover_tests"
path = "tests/failover_tests.rs"
[[test]]
name = "integration_chat"
path = "tests/integration_chat.rs"
[[test]]
name = "integration_models"
path = "tests/integration_models.rs"
[[test]]
name = "integration_streaming"
path = "tests/integration_streaming.rs"
[[test]]
name = "integration_tool_calling"
path = "tests/integration_tool_calling.rs"
[[test]]
name = "secret_tests"
path = "tests/secret_tests.rs"