dynamo_async_openai/types/
mod.rs

1// SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2// SPDX-License-Identifier: Apache-2.0
3//
4// Based on https://github.com/64bit/async-openai/ by Himanshu Neema
5// Original Copyright (c) 2022 Himanshu Neema
6// Licensed under MIT License (see ATTRIBUTIONS-Rust.md)
7//
8// Modifications Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES.
9// Licensed under Apache 2.0
10
11//! Types used in OpenAI API requests and responses.
12//! These types are created from component schemas in the [OpenAPI spec](https://github.com/openai/openai-openapi)
13mod assistant;
14mod assistant_impls;
15mod assistant_stream;
16mod audio;
17mod audit_log;
18mod batch;
19mod chat;
20mod common;
21mod completion;
22mod embedding;
23mod file;
24mod fine_tuning;
25mod image;
26mod invites;
27mod message;
28mod model;
29mod moderation;
30mod project_api_key;
31mod project_service_account;
32mod project_users;
33mod projects;
34#[cfg_attr(docsrs, doc(cfg(feature = "realtime")))]
35#[cfg(feature = "realtime")]
36pub mod realtime;
37pub mod responses;
38mod run;
39mod step;
40mod thread;
41mod upload;
42mod users;
43mod vector_store;
44
45pub use assistant::*;
46pub use assistant_stream::*;
47pub use audio::*;
48pub use audit_log::*;
49pub use batch::*;
50pub use chat::*;
51pub use common::*;
52pub use completion::*;
53pub use embedding::*;
54pub use file::*;
55pub use fine_tuning::*;
56pub use image::*;
57pub use invites::*;
58pub use message::*;
59pub use model::*;
60pub use moderation::*;
61pub use project_api_key::*;
62pub use project_service_account::*;
63pub use project_users::*;
64pub use projects::*;
65pub use run::*;
66pub use step::*;
67pub use thread::*;
68pub use upload::*;
69pub use users::*;
70pub use vector_store::*;
71
72mod impls;
73use derive_builder::UninitializedFieldError;
74
75use crate::error::OpenAIError;
76
77impl From<UninitializedFieldError> for OpenAIError {
78    fn from(value: UninitializedFieldError) -> Self {
79        OpenAIError::InvalidArgument(value.to_string())
80    }
81}