async_openai/types/
mod.rs

1//! Types used in OpenAI API requests and responses.
2//! These types are created from component schemas in the [OpenAPI spec](https://github.com/openai/openai-openapi)
3#[cfg(feature = "administration-types")]
4pub mod admin;
5#[cfg(feature = "assistant-types")]
6pub mod assistants;
7#[cfg(feature = "audio-types")]
8pub mod audio;
9#[cfg(feature = "batch-types")]
10pub mod batches;
11#[cfg(feature = "chat-completion-types")]
12pub mod chat;
13#[cfg(feature = "chatkit-types")]
14pub mod chatkit;
15#[cfg(feature = "completion-types")]
16pub mod completions;
17#[cfg(feature = "container-types")]
18pub mod containers;
19#[cfg(feature = "embedding-types")]
20pub mod embeddings;
21#[cfg(feature = "eval-types")]
22pub mod evals;
23#[cfg(feature = "file-types")]
24pub mod files;
25#[cfg(feature = "finetuning-types")]
26pub mod finetuning;
27#[cfg(feature = "grader-types")]
28pub mod graders;
29#[cfg(feature = "image-types")]
30pub mod images;
31#[cfg(any(
32    feature = "audio-types",
33    feature = "file-types",
34    feature = "upload-types",
35    feature = "image-types",
36    feature = "video-types",
37    feature = "container-types",
38    feature = "chat-completion-types",
39    feature = "realtime-types"
40))]
41mod input_source;
42#[cfg(any(feature = "response-types", feature = "realtime-types"))]
43pub mod mcp;
44#[cfg(any(
45    feature = "response-types",
46    feature = "audio-types",
47    feature = "video-types",
48    feature = "image-types",
49    feature = "batch-types",
50    feature = "file-types",
51    feature = "upload-types",
52    feature = "vectorstore-types",
53    feature = "container-types",
54    feature = "chat-completion-types",
55    feature = "realtime-types"
56))]
57mod metadata;
58#[cfg(feature = "model-types")]
59pub mod models;
60#[cfg(feature = "moderation-types")]
61pub mod moderations;
62#[cfg_attr(docsrs, doc(cfg(feature = "realtime-types")))]
63#[cfg(feature = "realtime-types")]
64pub mod realtime;
65#[cfg(feature = "response-types")]
66pub mod responses;
67#[cfg(any(
68    feature = "response-types",
69    feature = "video-types",
70    feature = "vectorstore-types",
71    feature = "chat-completion-types",
72    feature = "assistant-types",
73    feature = "batch-types",
74    feature = "audio-types",
75    feature = "realtime-types",
76    feature = "image-types"
77))]
78mod shared;
79#[cfg(feature = "upload-types")]
80pub mod uploads;
81#[cfg(feature = "vectorstore-types")]
82pub mod vectorstores;
83#[cfg(feature = "video-types")]
84pub mod videos;
85#[cfg_attr(docsrs, doc(cfg(feature = "webhook-types")))]
86#[cfg(feature = "webhook-types")]
87pub mod webhooks;
88
89#[cfg(any(
90    feature = "audio-types",
91    feature = "file-types",
92    feature = "upload-types",
93    feature = "image-types",
94    feature = "video-types",
95    feature = "container-types",
96    feature = "chat-completion-types",
97    feature = "realtime-types"
98))]
99pub use input_source::*;
100
101#[cfg(any(
102    feature = "audio-types",
103    feature = "batch-types",
104    feature = "file-types",
105    feature = "upload-types",
106    feature = "image-types",
107    feature = "video-types",
108    feature = "vectorstore-types",
109    feature = "container-types",
110    feature = "response-types",
111    feature = "chat-completion-types",
112    feature = "realtime-types"
113))]
114pub use metadata::*;
115
116#[cfg(any(
117    feature = "audio-types",
118    feature = "file-types",
119    feature = "image-types",
120    feature = "chat-completion-types",
121    feature = "completion-types",
122    feature = "embedding-types",
123    feature = "moderation-types",
124    feature = "video-types"
125))]
126mod impls;
127
128#[cfg(any(
129    feature = "response-types",
130    feature = "audio-types",
131    feature = "file-types",
132    feature = "image-types",
133    feature = "chat-completion-types",
134    feature = "completion-types",
135    feature = "embedding-types",
136    feature = "moderation-types",
137    feature = "administration-types",
138))]
139impl From<derive_builder::UninitializedFieldError> for crate::error::OpenAIError {
140    fn from(value: derive_builder::UninitializedFieldError) -> Self {
141        crate::error::OpenAIError::InvalidArgument(value.to_string())
142    }
143}