[package]
edition = "2021"
name = "async-llm"
version = "0.9.0"
authors = ["Timon Vonk <timon@bosun.ai>"]
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Async Rust client for LLM APIs - Anthropic Messages API today; fork of async-anthropic with thinking-block and prompt-cache support."
homepage = "https://github.com/blossomstack/async-llm"
readme = "README.md"
keywords = [
"llm",
"anthropic",
"ai",
"gpt",
"claude",
]
categories = [
"api-bindings",
"web-programming",
"asynchronous",
]
license = "MIT"
repository = "https://github.com/blossomstack/async-llm"
[features]
anthropic = []
default = [
"anthropic",
"rustls",
]
mock = [
"anthropic",
"openai",
"responses",
"dep:axum",
"dep:futures",
"dep:parking_lot",
"dep:uuid",
"tokio/macros",
"tokio/net",
"tokio/rt-multi-thread",
"tokio/sync",
]
native-tls = ["reqwest/native-tls"]
openai = ["dep:async-stream"]
responses = ["openai"]
rustls = ["reqwest/rustls-tls-native-roots"]
[lib]
name = "async_llm"
path = "src/lib.rs"
[[bin]]
name = "async-llm-mock"
path = "src/bin/async-llm-mock.rs"
required-features = ["mock"]
[[example]]
name = "basic_usage"
path = "examples/basic_usage.rs"
[[example]]
name = "models"
path = "examples/models.rs"
[[example]]
name = "streaming"
path = "examples/streaming.rs"
[[example]]
name = "streaming_tools"
path = "examples/streaming_tools.rs"
[[example]]
name = "tool_usage"
path = "examples/tool_usage.rs"
[[test]]
name = "anthropic_compat"
path = "tests/anthropic_compat.rs"
[[test]]
name = "feature_matrix"
path = "tests/feature_matrix.rs"
[[test]]
name = "messages"
path = "tests/messages.rs"
[[test]]
name = "mock_server"
path = "tests/mock_server.rs"
[[test]]
name = "models"
path = "tests/models.rs"
[[test]]
name = "openai_client"
path = "tests/openai_client.rs"
[[test]]
name = "responses_client"
path = "tests/responses_client.rs"
[[test]]
name = "responses_review"
path = "tests/responses_review.rs"
[dependencies.async-stream]
version = "0.3"
optional = true
[dependencies.async-trait]
version = "0.1.88"
[dependencies.axum]
version = "0.8"
optional = true
[dependencies.backoff]
version = "0.4"
features = [
"futures",
"tokio",
]
[dependencies.base64]
version = "0.22"
[dependencies.derive_builder]
version = "0.20.2"
[dependencies.futures]
version = "0.3"
optional = true
[dependencies.parking_lot]
version = "0.12"
optional = true
[dependencies.reqwest]
version = "0.12"
features = [
"json",
"stream",
]
default-features = false
[dependencies.reqwest-eventsource]
version = "0.6.0"
[dependencies.secrecy]
version = "0.10.3"
[dependencies.serde]
version = "1.0"
features = ["derive"]
default-features = false
[dependencies.serde_json]
version = "1.0"
default-features = false
[dependencies.thiserror]
version = "2.0"
[dependencies.tokio]
version = "1"
features = ["time"]
default-features = false
[dependencies.tokio-stream]
version = "0.1.14"
default-features = false
[dependencies.tracing]
version = "0.1.41"
[dependencies.uuid]
version = "1"
features = ["v4"]
optional = true
[dev-dependencies.async-trait]
version = "0.1.88"
[dev-dependencies.test-log]
version = "0.2.17"
[dev-dependencies.tokio]
version = "1"
features = ["full"]
[dev-dependencies.wiremock]
version = "0.6.3"