openai-core 0.1.1

Rust SDK for OpenAI-compatible ecosystem
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 = "2024"
rust-version = "1.94.1"
name = "openai-core"
version = "0.1.1"
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Rust SDK for OpenAI-compatible ecosystem"
homepage = "https://github.com/goo-yyh/openai-rs"
documentation = "https://docs.rs/openai-core"
readme = "README.md"
keywords = [
    "openai",
    "sdk",
    "api",
    "llm",
    "async",
]
categories = [
    "api-bindings",
    "asynchronous",
    "web-programming",
    "network-programming",
]
license = "MIT"
repository = "https://github.com/goo-yyh/openai-rs"

[package.metadata.docs.rs]
all-features = true
rustdoc-args = [
    "--cfg",
    "docsrs",
]

[features]
default = [
    "stream",
    "multipart",
    "webhooks",
    "rustls-tls",
]
multipart = []
realtime = ["tokio-tungstenite"]
responses-ws = ["tokio-tungstenite"]
rustls-tls = []
stream = []
structured-output = ["dep:schemars"]
tool-runner = ["structured-output"]
webhooks = []

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

[dependencies.base64]
version = "0.22.1"

[dependencies.bytes]
version = "1.11.1"

[dependencies.futures-util]
version = "0.3.32"

[dependencies.hmac]
version = "0.13.0"

[dependencies.http]
version = "1.4.0"

[dependencies.mime_guess]
version = "2.0.5"

[dependencies.percent-encoding]
version = "2.3.2"

[dependencies.reqwest]
version = "0.13.2"
features = [
    "charset",
    "http2",
    "json",
    "multipart",
    "query",
    "rustls",
    "stream",
]
default-features = false

[dependencies.schemars]
version = "1.2.1"
features = ["derive"]
optional = true

[dependencies.secrecy]
version = "0.10.3"
features = ["serde"]

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

[dependencies.serde_json]
version = "1.0.149"

[dependencies.sha2]
version = "0.11.0"

[dependencies.subtle]
version = "2.6.1"

[dependencies.thiserror]
version = "2.0.18"

[dependencies.tokio]
version = "1.51.0"
features = [
    "fs",
    "io-util",
    "macros",
    "net",
    "process",
    "rt-multi-thread",
    "sync",
    "time",
]

[dependencies.tokio-tungstenite]
version = "0.29.0"
features = ["rustls-tls-webpki-roots"]
optional = true

[dependencies.tokio-util]
version = "0.7.18"
features = ["rt"]

[dependencies.tracing]
version = "0.1.44"
features = ["attributes"]

[dependencies.url]
version = "2.5.8"

[dev-dependencies.dotenvy]
version = "0.15.7"

[dev-dependencies.insta]
version = "1.47.2"

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

[dev-dependencies.rstest]
version = "0.26.1"

[dev-dependencies.schemars]
version = "1.2.1"
features = ["derive"]

[dev-dependencies.serial_test]
version = "3.4.0"

[dev-dependencies.tracing-subscriber]
version = "0.3.23"

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