open_ai_rust 1.1.1

Idiomatic Rust SDK for the OpenAI API: chat, responses, embeddings, audio, images, moderations, files, batches, vector stores, fine-tuning. Builder payloads, typed function-call schemas, streaming, per-request retries/timeouts.
Documentation
# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
#
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
# to registry (e.g., crates.io) dependencies.
#
# If you are reading this file be aware that the original Cargo.toml
# will likely look very different (and much more reasonable).
# See Cargo.toml.orig for the original contents.

[package]
edition = "2021"
name = "open_ai_rust"
version = "1.1.1"
authors = ["Lachy Hislop <lachie.hislop@gmail.com>"]
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Idiomatic Rust SDK for the OpenAI API: chat, responses, embeddings, audio, images, moderations, files, batches, vector stores, fine-tuning. Builder payloads, typed function-call schemas, streaming, per-request retries/timeouts."
homepage = "https://github.com/Lenard-0/open_ai_rust"
documentation = "https://docs.rs/open_ai_rust"
readme = "README.md"
keywords = [
    "OpenAI",
    "API",
    "Rust",
    "library",
    "SDK",
]
categories = [
    "api-bindings",
    "web-programming",
]
license = "Apache-2.0"
repository = "https://github.com/Lenard-0/open_ai_rust"

[features]
default = [
    "rustls-tls",
    "stream",
]
native-tls = ["reqwest/native-tls"]
rustls-tls = ["reqwest/rustls"]
stream = []
tool_registry = [
    "dep:linkme",
    "open_ai_rust_fn_call_extension/tool_registry",
]
tracing = ["dep:tracing"]
utoipa = ["dep:utoipa"]

[lib]
name = "open_ai_rust"
path = "src/lib.rs"

[[example]]
name = "chat_basic"
path = "examples/chat_basic.rs"

[[example]]
name = "chat_stream"
path = "examples/chat_stream.rs"

[[example]]
name = "embed_text"
path = "examples/embed_text.rs"

[[example]]
name = "function_call"
path = "examples/function_call.rs"

[[example]]
name = "responses_basic"
path = "examples/responses_basic.rs"

[[example]]
name = "responses_stream"
path = "examples/responses_stream.rs"

[[example]]
name = "structured_output"
path = "examples/structured_output.rs"

[[example]]
name = "transcription"
path = "examples/transcription.rs"

[[example]]
name = "tts"
path = "examples/tts.rs"

[[test]]
name = "ai_msg_res_to_json_tests"
path = "tests/ai_msg_res_to_json_tests.rs"

[[test]]
name = "client_branches"
path = "tests/client_branches.rs"

[[test]]
name = "coverage_gaps"
path = "tests/coverage_gaps.rs"

[[test]]
name = "coverage_units"
path = "tests/coverage_units.rs"

[[test]]
name = "error_paths"
path = "tests/error_paths.rs"

[[test]]
name = "function_calling"
path = "tests/function_calling.rs"

[[test]]
name = "live_smoke"
path = "tests/live_smoke.rs"

[[test]]
name = "macro_to_fn_call"
path = "tests/macro_to_fn_call.rs"

[[test]]
name = "parsing_tool_call_res"
path = "tests/parsing_tool_call_res.rs"

[[test]]
name = "proptest_function_schema"
path = "tests/proptest_function_schema.rs"

[[test]]
name = "serde_payload"
path = "tests/serde_payload.rs"

[[test]]
name = "struct_macro_parsing"
path = "tests/struct_macro_parsing.rs"

[[test]]
name = "tool_call_input_parsing"
path = "tests/tool_call_input_parsing.rs"

[[test]]
name = "tool_registry"
path = "tests/tool_registry.rs"

[[test]]
name = "wire_format_snapshots"
path = "tests/wire_format_snapshots.rs"

[[test]]
name = "wiremock_endpoints"
path = "tests/wiremock_endpoints.rs"

[[test]]
name = "wiremock_more_endpoints"
path = "tests/wiremock_more_endpoints.rs"

[[bench]]
name = "hot_paths"
path = "benches/hot_paths.rs"
harness = false

[dependencies.async-stream]
version = "0.3"

[dependencies.bytes]
version = "1"

[dependencies.dotenv]
version = "0.15"

[dependencies.futures-core]
version = "0.3"

[dependencies.futures-util]
version = "0.3"
features = ["std"]
default-features = false

[dependencies.linkme]
version = "0.3"
optional = true

[dependencies.open_ai_rust_fn_call_extension]
version = "0.3"
default-features = false

[dependencies.reqwest]
version = "0.13"
features = [
    "json",
    "multipart",
    "stream",
]
default-features = false

[dependencies.serde]
version = "1.0.219"
features = ["derive"]

[dependencies.serde_json]
version = "1.0.149"

[dependencies.thiserror]
version = "2"

[dependencies.tokio]
version = "1.49.0"
features = ["full"]

[dependencies.tracing]
version = "0.1"
optional = true

[dependencies.utoipa]
version = "5.4.0"
optional = true

[dev-dependencies.criterion]
version = "0.5"
features = ["cargo_bench_support"]
default-features = false

[dev-dependencies.insta]
version = "1"
features = ["json"]

[dev-dependencies.linkme]
version = "0.3"

[dev-dependencies.proptest]
version = "1"

[dev-dependencies.wiremock]
version = "0.6"