[package]
edition = "2021"
rust-version = "1.70"
name = "api_openai_compatible"
version = "0.4.1"
authors = ["Kostiantyn Mysnyk <wandalen@obox.systems>"]
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = """
Shared OpenAI wire-protocol HTTP layer for OpenAI-compatible APIs.
"""
homepage = "https://github.com/Wandalen/api_llm/tree/master/api/openai_compatible"
documentation = "https://docs.rs/api_openai_compatible"
readme = "readme.md"
keywords = [
"fundamental",
"general-purpose",
"openai",
"llm",
"ai",
]
categories = [
"algorithms",
"development-tools",
]
license = "MIT"
repository = "https://github.com/Wandalen/api_llm/tree/master/api/openai_compatible"
[package.metadata.docs.rs]
features = ["full"]
all-features = false
[features]
default = ["full"]
enabled = [
"dep:error_tools",
"dep:mod_interface",
"dep:serde",
"dep:serde_json",
"dep:reqwest",
"dep:former",
]
full = [
"enabled",
"integration",
"streaming",
"sync_api",
]
integration = []
streaming = []
sync_api = ["dep:tokio"]
[lib]
name = "api_openai_compatible"
path = "src/lib.rs"
[[test]]
name = "client_test"
path = "tests/client_test.rs"
[[test]]
name = "environment_test"
path = "tests/environment_test.rs"
[[test]]
name = "error_test"
path = "tests/error_test.rs"
[[test]]
name = "sync_client_test"
path = "tests/sync_client_test.rs"
[[test]]
name = "wire_test"
path = "tests/wire_test.rs"
[dependencies.error_tools]
version = "^0.40"
features = ["error_typed"]
optional = true
[dependencies.former]
version = "^2.48"
optional = true
[dependencies.mod_interface]
version = "^0.64"
optional = true
[dependencies.reqwest]
version = "^0.13"
features = ["json"]
optional = true
default-features = false
[dependencies.serde]
version = "^1.0"
features = ["derive"]
optional = true
[dependencies.serde_json]
version = "^1.0"
optional = true
[dependencies.tokio]
version = "^1.52"
features = [
"rt",
"rt-multi-thread",
]
optional = true
[dev-dependencies.reqwest]
version = "^0.13"
features = [
"json",
"rustls",
]
default-features = false
[dev-dependencies.serde_json]
version = "^1.0"
[dev-dependencies.tokio]
version = "^1.52"
features = [
"macros",
"rt-multi-thread",
]
[dev-dependencies.workspace_tools]
version = "^0.14"
features = ["secrets"]
[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