[package]
edition = "2021"
rust-version = "1.70"
name = "api_gemini"
version = "0.7.1"
authors = ["Kostiantyn Mysnyk <wandalen@obox.systems>"]
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = """
Gemini's API for accessing large language models (LLMs).
"""
homepage = "https://github.com/Wandalen/api_llm/tree/master/api/gemini"
documentation = "https://docs.rs/api_gemini"
readme = "readme.md"
keywords = [
"fundamental",
"general-purpose",
]
categories = [
"algorithms",
"development-tools",
]
license = "MIT"
repository = "https://github.com/Wandalen/api_llm/tree/master/api/gemini"
[package.metadata.docs.rs]
features = ["full"]
all-features = false
[features]
batch_operations = []
buffered_streaming = []
builder_patterns = []
caching = []
chat = []
circuit_breaker = []
compression = [
"flate2",
"brotli",
"async-compression",
]
default = ["full"]
diagnostics_curl = []
dynamic_configuration = [
"notify",
"async-trait",
]
enabled = [
"dep:mod_interface",
"dep:error_tools",
"dep:workspace_tools",
"dep:former",
"dep:rand",
"dep:uuid",
"dep:regex",
"dep:serde",
"dep:serde_with",
"dep:serde_json",
"dep:base64",
"dep:secrecy",
"dep:urlencoding",
"dep:futures-core",
"dep:futures-util",
"dep:futures",
"dep:async-stream",
"dep:backoff",
"dep:tokio",
"dep:tokio-stream",
"dep:bytes",
"dep:reqwest",
"dep:tracing",
]
enterprise_quota = [
"parking_lot",
"chrono",
]
failover = []
full = [
"enabled",
"integration",
"diagnostics_curl",
"logging",
"streaming",
"websocket_streaming",
"streaming_control",
"chat",
"retry",
"circuit_breaker",
"rate_limiting",
"failover",
"health_checks",
"builder_patterns",
"caching",
"dynamic_configuration",
"batch_operations",
"compression",
"enterprise_quota",
"model_comparison",
"request_templates",
"buffered_streaming",
]
health_checks = []
integration = []
logging = ["dep:tracing-subscriber"]
model_comparison = []
performance = []
rate_limiting = []
request_templates = []
retry = []
streaming = []
streaming_control = []
stress = []
websocket_streaming = ["dep:tokio-tungstenite"]
[lib]
name = "api_gemini"
path = "src/lib.rs"
[[example]]
name = "gemini_api_basic"
path = "examples/gemini_api_basic.rs"
[[example]]
name = "gemini_api_cached_interactive"
path = "examples/gemini_api_cached_interactive.rs"
[[example]]
name = "gemini_api_interactive"
path = "examples/gemini_api_interactive.rs"
[[example]]
name = "gemini_code_execution"
path = "examples/gemini_code_execution.rs"
[[example]]
name = "gemini_dry_run"
path = "examples/gemini_dry_run.rs"
[[example]]
name = "gemini_embeddings"
path = "examples/gemini_embeddings.rs"
[[example]]
name = "gemini_error_handling"
path = "examples/gemini_error_handling.rs"
[[example]]
name = "gemini_function_calling"
path = "examples/gemini_function_calling.rs"
[[example]]
name = "gemini_list_models"
path = "examples/gemini_list_models.rs"
[[example]]
name = "gemini_multimodal"
path = "examples/gemini_multimodal.rs"
[[example]]
name = "gemini_performance_optimization"
path = "examples/gemini_performance_optimization.rs"
[[example]]
name = "gemini_safety_settings"
path = "examples/gemini_safety_settings.rs"
[[example]]
name = "gemini_search_grounding"
path = "examples/gemini_search_grounding.rs"
[[example]]
name = "gemini_system_instructions"
path = "examples/gemini_system_instructions.rs"
[[test]]
name = "api_key_failure_tests"
path = "tests/api_key_failure_tests.rs"
[[test]]
name = "audio_processing_tests"
path = "tests/audio_processing_tests.rs"
[[test]]
name = "buffered_streaming_tests"
path = "tests/buffered_streaming_tests.rs"
[[test]]
name = "cache_tests"
path = "tests/cache_tests.rs"
[[test]]
name = "code_execution_tests"
path = "tests/code_execution_tests.rs"
[[test]]
name = "comprehensive_integration_tests"
path = "tests/comprehensive_integration_tests.rs"
[[test]]
name = "compression_tests"
path = "tests/compression_tests.rs"
[[test]]
name = "config_optimization_tests"
path = "tests/config_optimization_tests.rs"
[[test]]
name = "cost_quota_tests"
path = "tests/cost_quota_tests.rs"
[[test]]
name = "count_tokens_tests"
path = "tests/count_tokens_tests.rs"
[[test]]
name = "dynamic_configuration_tests"
path = "tests/dynamic_configuration_tests.rs"
[[test]]
name = "enhanced_circuit_breaker_tests"
path = "tests/enhanced_circuit_breaker_tests.rs"
[[test]]
name = "enhanced_rate_limiting_tests"
path = "tests/enhanced_rate_limiting_tests.rs"
[[test]]
name = "enhanced_retry_logic_tests"
path = "tests/enhanced_retry_logic_tests.rs"
[[test]]
name = "enterprise_quota_management_tests"
path = "tests/enterprise_quota_management_tests.rs"
[[test]]
name = "example_validation_tests"
path = "tests/example_validation_tests.rs"
[[test]]
name = "failover_tests"
path = "tests/failover_tests.rs"
[[test]]
name = "health_checks_tests"
path = "tests/health_checks_tests.rs"
[[test]]
name = "integration_tests"
path = "tests/integration_tests.rs"
[[test]]
name = "model_comparison_tests"
path = "tests/model_comparison_tests.rs"
[[test]]
name = "streaming_control_tests"
path = "tests/streaming_control_tests.rs"
[[test]]
name = "streaming_optimization_tests"
path = "tests/streaming_optimization_tests.rs"
[[test]]
name = "structured_logging_tests"
path = "tests/structured_logging_tests.rs"
[[test]]
name = "sync_api_tests"
path = "tests/sync_api_tests.rs"
[[test]]
name = "system_instructions_tests"
path = "tests/system_instructions_tests.rs"
[[test]]
name = "templates_tests"
path = "tests/templates_tests.rs"
[[test]]
name = "websocket_streaming_tests"
path = "tests/websocket_streaming_tests.rs"
[[bench]]
name = "circuit_breaker_overhead"
path = "benches/circuit_breaker_overhead.rs"
harness = false
[[bench]]
name = "client_overhead"
path = "benches/client_overhead.rs"
harness = false
[[bench]]
name = "rate_limiting_overhead"
path = "benches/rate_limiting_overhead.rs"
harness = false
[[bench]]
name = "retry_logic_overhead"
path = "benches/retry_logic_overhead.rs"
harness = false
[[bench]]
name = "streaming_overhead"
path = "benches/streaming_overhead.rs"
harness = false
[dependencies.async-compression]
version = "^0.4"
features = [
"tokio",
"gzip",
"deflate",
"brotli",
]
optional = true
[dependencies.async-stream]
version = "^0.3"
optional = true
[dependencies.async-trait]
version = "^0.1"
optional = true
[dependencies.backoff]
version = "^0.4"
features = ["tokio"]
optional = true
[dependencies.base64]
version = "^0.22"
optional = true
[dependencies.brotli]
version = "^8.0"
optional = true
[dependencies.bytes]
version = "^1.10"
optional = true
[dependencies.chrono]
version = "^0.4"
optional = true
[dependencies.error_tools]
version = "^0.40"
features = ["error_typed"]
optional = true
[dependencies.flate2]
version = "^1.1"
optional = true
[dependencies.former]
version = "^2.48"
optional = true
[dependencies.futures]
version = "^0.3"
optional = true
[dependencies.futures-core]
version = "^0.3"
optional = true
[dependencies.futures-util]
version = "^0.3"
optional = true
[dependencies.mod_interface]
version = "^0.64"
optional = true
[dependencies.notify]
version = "^8.2"
features = ["macos_fsevent"]
optional = true
[dependencies.parking_lot]
version = "^0.12"
optional = true
[dependencies.rand]
version = "^0.10"
optional = true
[dependencies.regex]
version = "^1.12"
optional = true
[dependencies.reqwest]
version = "^0.13"
features = [
"json",
"query",
"stream",
"multipart",
"rustls",
]
optional = true
default-features = false
[dependencies.secrecy]
version = "^0.10"
features = ["serde"]
optional = true
[dependencies.serde]
version = "^1.0"
features = ["derive"]
optional = true
[dependencies.serde_json]
version = "^1.0"
optional = true
[dependencies.serde_with]
version = "^3.21"
optional = true
[dependencies.tokio]
version = "^1.52"
features = [
"macros",
"sync",
"time",
"rt-multi-thread",
]
optional = true
[dependencies.tokio-stream]
version = "^0.1"
optional = true
[dependencies.tokio-tungstenite]
version = "^0.29"
features = ["rustls-tls-webpki-roots"]
optional = true
[dependencies.tracing]
version = "^0.1"
optional = true
[dependencies.tracing-subscriber]
version = "^0.3"
features = [
"env-filter",
"fmt",
]
optional = true
[dependencies.urlencoding]
version = "^2.1"
optional = true
[dependencies.uuid]
version = "^1.23"
features = ["v4"]
optional = true
[dependencies.workspace_tools]
version = "^0.14"
features = ["secrets"]
optional = true
[dev-dependencies.criterion]
version = "^0.8"
[dev-dependencies.reqwest]
version = "^0.13"
default-features = false
[dev-dependencies.tokio-stream]
version = "^0.1"
[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"
module_name_repetitions = "allow"
pub_use = "allow"
question_mark_used = "allow"
single_call_fn = "allow"
std_instead_of_alloc = "allow"
std_instead_of_core = "allow"
undocumented_unsafe_blocks = "deny"
wildcard_imports = "allow"
[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