[[bench]]
harness = false
name = "circuit_breaker_overhead"
path = "benches/circuit_breaker_overhead.rs"
[[bench]]
harness = false
name = "client_overhead"
path = "benches/client_overhead.rs"
[[bench]]
harness = false
name = "rate_limiting_overhead"
path = "benches/rate_limiting_overhead.rs"
[[bench]]
harness = false
name = "retry_logic_overhead"
path = "benches/retry_logic_overhead.rs"
[[bench]]
harness = false
name = "streaming_overhead"
path = "benches/streaming_overhead.rs"
[dependencies.async-compression]
features = ["tokio", "gzip", "deflate", "brotli"]
optional = true
version = "0.4.33"
[dependencies.async-stream]
version = "0.3.6"
[dependencies.async-trait]
optional = true
version = "0.1.89"
[dependencies.backoff]
features = ["tokio"]
version = "0.4.0"
[dependencies.base64]
version = "0.22.1"
[dependencies.brotli]
optional = true
version = "8.0.2"
[dependencies.bytes]
version = "1.10.1"
[dependencies.chrono]
optional = true
version = "0.4.42"
[dependencies.error_tools]
version = "0.35.0"
[dependencies.flate2]
optional = true
version = "1.1.5"
[dependencies.former]
version = "2.37.0"
[dependencies.futures]
version = "0.3.31"
[dependencies.futures-core]
version = "0.3.31"
[dependencies.futures-util]
version = "0.3.31"
[dependencies.mod_interface]
version = "0.52.0"
[dependencies.notify]
features = ["macos_fsevent"]
optional = true
version = "8.2.0"
[dependencies.parking_lot]
optional = true
version = "0.12.5"
[dependencies.rand]
version = "0.9.2"
[dependencies.regex]
version = "1.12.2"
[dependencies.reqwest]
default-features = false
features = ["json", "stream", "multipart", "rustls-tls"]
version = "0.12.24"
[dependencies.secrecy]
features = ["serde"]
version = "0.10.3"
[dependencies.serde]
features = ["derive"]
version = "1.0.228"
[dependencies.serde_json]
version = "1.0.145"
[dependencies.serde_with]
version = "3.15.1"
[dependencies.serde_yaml]
version = "0.9.34"
[dependencies.tokio]
features = ["macros", "sync", "time", "rt-multi-thread"]
version = "1.48.0"
[dependencies.tokio-stream]
version = "0.1.17"
[dependencies.tokio-tungstenite]
features = ["native-tls"]
version = "0.28.0"
[dependencies.tracing]
version = "=0.1.40"
[dependencies.tracing-subscriber]
features = ["env-filter", "fmt"]
version = "=0.3.18"
[dependencies.urlencoding]
version = "2.1.3"
[dependencies.uuid]
features = ["v4", "v4"]
version = "1.18.1"
[dependencies.workspace_tools]
features = ["secrets"]
version = "0.10.0"
[dev-dependencies.criterion]
version = "0.5"
[[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"
[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 = []
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 = []
model_comparison = []
performance = []
rate_limiting = []
request_templates = []
retry = []
streaming = []
streaming_control = []
stress = []
websocket_streaming = []
[lib]
name = "api_gemini"
path = "src/lib.rs"
[lints.clippy]
absolute_paths = "allow"
arbitrary_source_item_ordering = "allow"
assertions_on_constants = "allow"
await_holding_lock = "allow"
cast_precision_loss = "allow"
clone_on_copy = "allow"
collapsible_if = "allow"
derivable_impls = "allow"
doc_include_without_cfg = "warn"
double_must_use = "allow"
drain_collect = "allow"
extend_with_drain = "allow"
implicit_return = "allow"
inline_always = "allow"
items_after_statements = "allow"
let_unit_value = "allow"
manual_clamp = "allow"
manual_map = "allow"
manual_range_contains = "allow"
missing_errors_doc = "allow"
missing_inline_in_public_items = "allow"
module_name_repetitions = "allow"
must_use_candidate = "allow"
needless_borrows_for_generic_args = "allow"
new_without_default = "allow"
nonminimal_bool = "allow"
pub_use = "allow"
question_mark_used = "allow"
redundant_closure = "allow"
return_self_not_must_use = "allow"
single_call_fn = "allow"
std_instead_of_alloc = "allow"
std_instead_of_core = "allow"
too_many_arguments = "allow"
type_complexity = "allow"
undocumented_unsafe_blocks = "deny"
uninlined_format_args = "allow"
unnecessary_map_or = "allow"
unused_self = "allow"
unused_unit = "allow"
useless_vec = "allow"
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
[package]
authors = ["Kostiantyn Wandalen <wandalen@obox.systems>"]
autobenches = false
autobins = false
autoexamples = false
autolib = false
autotests = false
build = false
categories = ["algorithms", "development-tools"]
description = """
Gemini's API for accessing large language models (LLMs).
"""
documentation = "https://docs.rs/api_gemini"
edition = "2021"
homepage = "https://github.com/Wandalen/api_llm/tree/master/api/gemini"
keywords = ["fundamental", "general-purpose"]
license = "MIT"
name = "api_gemini"
readme = "readme.md"
repository = "https://github.com/Wandalen/api_llm/tree/master/api/gemini"
version = "0.5.0"
[package.metadata.docs.rs]
all-features = false
features = ["full"]
[[test]]
name = "api_key_failure_test"
path = "tests/api_key_failure_test.rs"
[[test]]
name = "audio_processing_tests"
path = "tests/audio_processing_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_test"
path = "tests/config_optimization_test.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_test"
path = "tests/example_validation_test.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 = "test_harness"
path = "tests/test_harness.rs"
[[test]]
name = "websocket_streaming_tests"
path = "tests/websocket_streaming_tests.rs"