[[bench]]
harness = false
name = "cache_performance"
path = "benches/cache_performance.rs"
[[bench]]
harness = false
name = "diagnostics_performance"
path = "benches/diagnostics_performance.rs"
[dependencies.base64]
optional = true
version = "0.22.1"
[dependencies.error_tools]
optional = true
version = "0.35.0"
[dependencies.fastrand]
optional = true
version = "2.3.0"
[dependencies.flate2]
optional = true
version = "1.0"
[dependencies.futures-channel]
optional = true
version = "0.3.31"
[dependencies.futures-core]
optional = true
version = "0.3.31"
[dependencies.futures-util]
optional = true
version = "0.3.31"
[dependencies.mod_interface]
optional = true
version = "0.52.0"
[dependencies.reqwest]
default-features = false
features = ["json", "stream"]
optional = true
version = "0.12.24"
[dependencies.serde]
features = ["derive"]
optional = true
version = "1.0.228"
[dependencies.serde_json]
optional = true
version = "1.0.145"
[dependencies.serde_yaml]
optional = true
version = "0.9.34"
[dependencies.tempfile]
optional = true
version = "3.23.0"
[dependencies.tokio]
features = ["time", "macros"]
optional = true
version = "1.48.0"
[dependencies.tokio-tungstenite]
optional = true
version = "0.28.0"
[dependencies.tokio-util]
optional = true
version = "0.7.17"
[dependencies.toml]
optional = true
version = "0.9.8"
[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.tempfile]
version = "3.23.0"
[dev-dependencies.tokio]
features = ["macros", "rt-multi-thread"]
version = "1.48.0"
[dev-dependencies.tokio-stream]
version = "0.1.17"
[[example]]
name = "ollama_chat_assistant"
path = "examples/ollama_chat_assistant.rs"
[[example]]
name = "ollama_chat_basic"
path = "examples/ollama_chat_basic.rs"
[[example]]
name = "ollama_chat_cached_interactive"
path = "examples/ollama_chat_cached_interactive.rs"
[[example]]
name = "ollama_chat_interactive"
path = "examples/ollama_chat_interactive.rs"
[[example]]
name = "ollama_chat_streaming"
path = "examples/ollama_chat_streaming.rs"
[[example]]
name = "ollama_code_assistant"
path = "examples/ollama_code_assistant.rs"
[[example]]
name = "ollama_document_analyzer"
path = "examples/ollama_document_analyzer.rs"
[[example]]
name = "ollama_multimodal_vision"
path = "examples/ollama_multimodal_vision.rs"
[features]
advanced = ["dep:tokio-util"]
audio_processing = ["reqwest/multipart"]
authentication = []
batch_operations = []
buffered_streaming = ["streaming"]
builder_patterns = []
cached_content = []
circuit_breaker = []
compression = ["dep:flate2"]
count_tokens = []
curl_diagnostics = []
default = ["full"]
dynamic_config = []
embeddings = []
enabled = ["dep:reqwest", "dep:serde", "dep:serde_json", "dep:tokio", "dep:futures-core", "dep:futures-util", "dep:error_tools", "dep:mod_interface", "vision_support"]
enhanced_function_calling = ["tool_calling"]
enterprise_quota = []
failover = ["dep:url"]
full = ["enabled", "streaming", "integration", "authentication", "advanced", "workspace", "secret_management", "embeddings", "builder_patterns", "retry_logic", "vision_support", "tool_calling", "integration_tests", "circuit_breaker", "general_diagnostics", "model_details", "sync_api", "failover", "health_checks", "dynamic_config", "streaming_control", "websocket_streaming", "model_tuning", "model_deployment", "rate_limiting", "retry", "request_caching", "audio_processing", "count_tokens", "cached_content", "batch_operations", "safety_settings", "structured_logging", "input_validation", "enhanced_function_calling", "model_comparison", "request_templates", "buffered_streaming", "compression", "enterprise_quota", "curl_diagnostics"]
general_diagnostics = []
health_checks = ["dep:tokio"]
input_validation = []
integration = []
integration_tests = []
model_comparison = []
model_deployment = ["dep:serde_yaml", "dep:url"]
model_details = []
model_tuning = ["dep:serde_yaml"]
rate_limiting = []
request_caching = []
request_templates = []
retry = ["dep:fastrand"]
retry_logic = ["dep:fastrand"]
safety_settings = []
secret_management = []
streaming = []
streaming_control = ["dep:tokio-util"]
structured_logging = ["dep:tracing"]
sync_api = []
tool_calling = []
vision_support = ["dep:base64"]
websocket_streaming = ["dep:tokio-tungstenite", "dep:futures-channel"]
workspace = ["dep:serde_yaml", "dep:toml", "dep:workspace_tools"]
[lib]
name = "api_ollama"
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 = ["api-bindings", "web-programming"]
description = """
Ollama local LLM runtime API client for HTTP communication.
"""
documentation = "https://docs.rs/api_ollama"
edition = "2021"
homepage = "https://github.com/Wandalen/api_llm/tree/master/api/ollama"
keywords = ["ollama", "llm", "ai", "local", "api"]
license = "MIT"
name = "api_ollama"
readme = "readme.md"
repository = "https://github.com/Wandalen/api_llm/tree/master/api/ollama"
version = "0.2.0"
[package.metadata.docs.rs]
all-features = false
features = ["full"]
[[test]]
name = "api_comprehensive_tests"
path = "tests/api_comprehensive_tests.rs"
[[test]]
name = "audio_processing_tests"
path = "tests/audio_processing_tests.rs"
[[test]]
name = "batch_operations_tests"
path = "tests/batch_operations_tests.rs"
[[test]]
name = "builder_construction_tests"
path = "tests/builder_construction_tests.rs"
[[test]]
name = "builder_patterns_tests"
path = "tests/builder_patterns_tests.rs"
[[test]]
name = "cached_content_tests"
path = "tests/cached_content_tests.rs"
[[test]]
name = "circuit_breaker_resilience_tests"
path = "tests/circuit_breaker_resilience_tests.rs"
[[test]]
name = "circuit_breaker_tests"
path = "tests/circuit_breaker_tests.rs"
[[test]]
name = "code_assistant_functionality_tests"
path = "tests/code_assistant_functionality_tests.rs"
[[test]]
name = "core_client_api_tests"
path = "tests/core_client_api_tests.rs"
[[test]]
name = "core_functionality_tests"
path = "tests/core_functionality_tests.rs"
[[test]]
name = "count_tokens_tests"
path = "tests/count_tokens_tests.rs"
[[test]]
name = "document_analyzer_functionality_tests"
path = "tests/document_analyzer_functionality_tests.rs"
[[test]]
name = "embeddings_request_validation_tests"
path = "tests/embeddings_request_validation_tests.rs"
[[test]]
name = "embeddings_tests"
path = "tests/embeddings_tests.rs"
[[test]]
name = "enhanced_circuit_breaker_tests"
path = "tests/enhanced_circuit_breaker_tests.rs"
[[test]]
name = "enhanced_function_calling_tests"
path = "tests/enhanced_function_calling_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 = "error_handling_tests"
path = "tests/error_handling_tests.rs"
[[test]]
name = "example_eof_handling_test"
path = "tests/example_eof_handling_test.rs"
[[test]]
name = "example_execution_validation_tests"
path = "tests/example_execution_validation_tests.rs"
[[test]]
name = "example_model_validation_test"
path = "tests/example_model_validation_test.rs"
[[test]]
name = "example_retry_logic_test"
path = "tests/example_retry_logic_test.rs"
[[test]]
name = "examples_comprehensive_tests"
path = "tests/examples_comprehensive_tests.rs"
[[test]]
name = "failover_tests"
path = "tests/failover_tests.rs"
[[test]]
name = "general_diagnostics_tests"
path = "tests/general_diagnostics_tests.rs"
[[test]]
name = "health_checks_tests"
path = "tests/health_checks_tests.rs"
[[test]]
name = "input_validation_tests"
path = "tests/input_validation_tests.rs"
[[test]]
name = "model_tuning_tests"
path = "tests/model_tuning_tests.rs"
[[test]]
name = "multimodal_request_validation_tests"
path = "tests/multimodal_request_validation_tests.rs"
[[test]]
name = "rate_limiting_behavior_tests"
path = "tests/rate_limiting_behavior_tests.rs"
[[test]]
name = "request_caching_tests"
path = "tests/request_caching_tests.rs"
[[test]]
name = "retry_logic_tests"
path = "tests/retry_logic_tests.rs"
[[test]]
name = "safety_settings_tests"
path = "tests/safety_settings_tests.rs"
[[test]]
name = "secret_management_tests"
path = "tests/secret_management_tests.rs"
[[test]]
name = "secret_management_workflow_tests"
path = "tests/secret_management_workflow_tests.rs"
[[test]]
name = "server_helpers"
path = "tests/server_helpers.rs"
[[test]]
name = "streaming_control_tests"
path = "tests/streaming_control_tests.rs"
[[test]]
name = "streaming_request_validation_tests"
path = "tests/streaming_request_validation_tests.rs"
[[test]]
name = "streaming_tests"
path = "tests/streaming_tests.rs"
[[test]]
name = "sync_api_tests"
path = "tests/sync_api_tests.rs"
[[test]]
name = "token_validation_tests"
path = "tests/token_validation_tests.rs"
[[test]]
name = "tool_calling_request_validation_tests"
path = "tests/tool_calling_request_validation_tests.rs"
[[test]]
name = "tool_calling_tests"
path = "tests/tool_calling_tests.rs"
[[test]]
name = "vision_request_validation_tests"
path = "tests/vision_request_validation_tests.rs"
[[test]]
name = "vision_support_tests"
path = "tests/vision_support_tests.rs"
[[test]]
name = "workspace_tests"
path = "tests/workspace_tests.rs"