# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
#
# Based on https://github.com/64bit/async-openai/ by Himanshu Neema
# Original Copyright (c) 2022 Himanshu Neema
# Licensed under MIT License (see ATTRIBUTIONS-Rust.md)
#
# Modifications Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES.
# Licensed under Apache 2.0

[package]
name = "dynamo-async-openai"
description = "Fork of async-openai customized for Dynamo."
license = "Apache-2.0 AND MIT"
version.workspace = true
edition.workspace = true
authors.workspace = true
homepage.workspace = true
repository.workspace = true
readme.workspace = true

[features]
realtime = ["dep:tokio-tungstenite"]
# Bring your own types
byot = []

[dependencies]
futures = { workspace = true }
rand = { workspace = true }
reqwest = { workspace = true }
serde = { workspace = true }
serde_json = { workspace = true }
thiserror = { workspace = true }
tokio = { workspace = true }
tokio-stream = { workspace = true }
tokio-util = { workspace = true }
tracing = { workspace = true }
url = { workspace = true }
uuid = { workspace = true }
derive_builder = { workspace = true }
bytes = { workspace = true }

eventsource-stream = "0.2.3"
async-openai-macros = "0.1.0"
backoff = { version = "0.4.0", features = ["tokio"] }
base64 = "0.22.1"
reqwest-eventsource = "0.6.0"
secrecy = { version = "0.10.3", features = ["serde"] }
tokio-tungstenite = { version = "0.26.1", optional = true, default-features = false }
utoipa = { version = "5.3", features = ["url", "uuid"] }

[dev-dependencies]
tokio-test = "0.4.4"
serde_json = { workspace = true }

[[test]]
name = "bring-your-own-type"
required-features = ["byot"]

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