Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
012d20d
pattern for shared types: FunctionObject
64bit Nov 24, 2025
8e56f96
shared FunctionName
64bit Nov 24, 2025
a194a21
shared ResponseFormat and ResponseFormatJsonSchema
64bit Nov 24, 2025
11f8d86
shared ImageDetail
64bit Nov 24, 2025
95a1fec
shared ImageUrl
64bit Nov 24, 2025
bab3716
shared FunctionCall
64bit Nov 24, 2025
a111322
consistent imports
64bit Nov 24, 2025
5ef3de8
consistent imports
64bit Nov 24, 2025
833b113
consistent imports
64bit Nov 24, 2025
24daebf
consistent impls for assistants
64bit Nov 24, 2025
1d95b59
cleanup OrganizationRole from common.rs
64bit Nov 24, 2025
ec061bd
rename assistant_stream.rs -> stream.rs
64bit Nov 24, 2025
146732e
rename audio_types.rs -> audio.rs
64bit Nov 24, 2025
8c8d685
shared LogProbProperties
64bit Nov 24, 2025
d4c1a52
clean import
64bit Nov 24, 2025
673a917
shared ResponseUsage
64bit Nov 24, 2025
496f50f
rename chat_types.rs -> chat.rs
64bit Nov 24, 2025
8f623fa
shared CustomGrammarFormatParam
64bit Nov 24, 2025
0d4fba0
embedding impls in impls.rs
64bit Nov 24, 2025
7adddf6
shared ImageDetail in responses
64bit Nov 24, 2025
dc6195d
shared ReasoningEffort
64bit Nov 24, 2025
1826611
import cleanup
64bit Nov 24, 2025
250be62
shared CompletionTokenDetails and PromptTokenDetails
64bit Nov 24, 2025
2d1a186
shared Filter; ComparisonFilter; CompoundFilter
64bit Nov 24, 2025
5730391
shared StaticChunkingStrategy
64bit Nov 24, 2025
60c3f32
shared ImageInput
64bit Nov 24, 2025
2ce65af
shared::ImageInput in impls.rs
64bit Nov 24, 2025
9bbf09d
mcp types in its own module
64bit Nov 24, 2025
42c4055
completions in its own types::completions module
64bit Nov 24, 2025
7c6d5b6
updated completions examples
64bit Nov 24, 2025
6aaa495
fix responses example
64bit Nov 24, 2025
426168c
doc comment
64bit Nov 24, 2025
bed2ae3
webhook.rs in its own types/webhooks
64bit Nov 24, 2025
c472b3c
move mcp.rs to types/mcp
64bit Nov 24, 2025
22a0cd2
shared TranscriptionUsage
64bit Nov 24, 2025
e869080
cargo fmt
64bit Nov 24, 2025
06eff20
fix test compilation
64bit Nov 24, 2025
6b41d82
rename tests
64bit Nov 24, 2025
5657366
Usage api under client.admin().usage() instead of client.usage()
64bit Nov 24, 2025
e5b0ccf
update admin usage example
64bit Nov 24, 2025
915b441
move admin APIs in admin src/admin
64bit Nov 24, 2025
df34ada
move audio apis in src/audio
64bit Nov 24, 2025
7817a3e
move assistants apis in src/assistants
64bit Nov 24, 2025
4d69d6e
vectore stores apis in src/vectorstores
64bit Nov 24, 2025
87fd897
fix byot test from client.usage() to client.admin().usage()
64bit Nov 24, 2025
19138c2
evals apis in src/evals
64bit Nov 24, 2025
bd32b4b
move container and container files apis in src/containers
64bit Nov 24, 2025
9257fbf
move responses api to src/responses
64bit Nov 24, 2025
65e2e29
admin types consistent with rest of the crate
64bit Nov 25, 2025
cfcc522
cargo clippy change name of contained module
64bit Nov 25, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion async-openai/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ tokio-test = "0.4.4"
serde_json = "1.0"

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

[package.metadata.docs.rs]
Expand Down
10 changes: 7 additions & 3 deletions async-openai/src/admin.rs → async-openai/src/admin/admin_.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use crate::{
admin_api_keys::AdminAPIKeys, audit_logs::AuditLogs, certificates::Certificates,
config::Config, groups::Groups, invites::Invites, projects::Projects, roles::Roles,
users::Users, Client,
config::Config, AdminAPIKeys, AuditLogs, Certificates, Client, Groups, Invites, Projects,
Roles, Usage, Users,
};

/// Admin group for all administration APIs.
Expand Down Expand Up @@ -54,4 +53,9 @@ impl<'c, C: Config> Admin<'c, C> {
pub fn groups(&self) -> Groups<'_, C> {
Groups::new(self.client)
}

/// To call [Usage] group related APIs using this client.
pub fn usage(&self) -> Usage<'_, C> {
Usage::new(self.client)
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
use crate::{
config::Config,
error::OpenAIError,
group_roles::GroupRoles,
group_users::GroupUsers,
types::admin::groups::{
CreateGroupBody, GroupDeletedResource, GroupListResource, GroupResourceWithSuccess,
GroupResponse,
},
Client, RequestOptions,
Client, GroupRoles, GroupUsers, RequestOptions,
};

/// Manage reusable collections of users for organization-wide access control and maintain their membership.
Expand Down
File renamed without changes.
45 changes: 45 additions & 0 deletions async-openai/src/admin/mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
mod admin_;
mod admin_api_keys;
mod audit_logs;
mod certificates;
mod group_roles;
mod group_users;
mod groups;
mod invites;
mod project_api_keys;
mod project_certificates;
mod project_group_roles;
mod project_groups;
mod project_rate_limits;
mod project_roles;
mod project_service_accounts;
mod project_user_roles;
mod project_users;
mod projects;
mod roles;
mod usage;
mod user_roles;
mod users;

pub use admin_::*;
pub use admin_api_keys::*;
pub use audit_logs::*;
pub use certificates::*;
pub use group_roles::*;
pub use group_users::*;
pub use groups::*;
pub use invites::*;
pub use project_api_keys::*;
pub use project_certificates::*;
pub use project_group_roles::*;
pub use project_groups::*;
pub use project_rate_limits::*;
pub use project_roles::*;
pub use project_service_accounts::*;
pub use project_user_roles::*;
pub use project_users::*;
pub use projects::*;
pub use roles::*;
pub use usage::*;
pub use user_roles::*;
pub use users::*;
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
use crate::{
config::Config,
error::OpenAIError,
project_api_keys::ProjectAPIKeys,
project_certificates::ProjectCertificates,
project_group_roles::ProjectGroupRoles,
project_groups::ProjectGroups,
project_rate_limits::ProjectRateLimits,
project_roles::ProjectRoles,
project_user_roles::ProjectUserRoles,
types::admin::projects::{
Project, ProjectCreateRequest, ProjectListResponse, ProjectUpdateRequest,
},
Client, ProjectServiceAccounts, ProjectUsers, RequestOptions,
Client, ProjectAPIKeys, ProjectCertificates, ProjectGroupRoles, ProjectGroups,
ProjectRateLimits, ProjectRoles, ProjectServiceAccounts, ProjectUserRoles, ProjectUsers,
RequestOptions,
};

/// Manage the projects within an organization includes creation, updating, and archiving or projects.
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ use crate::{
config::Config,
error::OpenAIError,
types::admin::users::{User, UserDeleteResponse, UserListResponse, UserRoleUpdateRequest},
user_roles::UserRoles,
Client, RequestOptions,
Client, RequestOptions, UserRoles,
};

/// Manage users and their role in an organization. Users will be automatically added to the Default project.
Expand Down
File renamed without changes.
11 changes: 11 additions & 0 deletions async-openai/src/assistants/mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
mod assistants_;
mod messages;
mod runs;
mod steps;
mod threads;

pub use assistants_::*;
pub use messages::*;
pub use runs::*;
pub use steps::*;
pub use threads::*;
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use crate::{
assistants::Steps,
config::Config,
error::OpenAIError,
steps::Steps,
types::assistants::{
AssistantEventStream, CreateRunRequest, ListRunsResponse, ModifyRunRequest, RunObject,
SubmitToolOutputsRunRequest,
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
9 changes: 9 additions & 0 deletions async-openai/src/audio/mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
mod audio_;
mod speech;
mod transcriptions;
mod translations;

pub use audio_::*;
pub use speech::*;
pub use transcriptions::*;
pub use translations::*;
File renamed without changes.
7 changes: 1 addition & 6 deletions async-openai/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use crate::{
moderation::Moderations,
traits::AsyncTryFrom,
Assistants, Audio, Batches, Chat, Completions, Containers, Conversations, Embeddings, Evals,
FineTuning, Models, RequestOptions, Responses, Threads, Uploads, Usage, VectorStores, Videos,
FineTuning, Models, RequestOptions, Responses, Threads, Uploads, VectorStores, Videos,
};

#[cfg(feature = "realtime")]
Expand Down Expand Up @@ -158,11 +158,6 @@ impl<C: Config> Client<C> {
Admin::new(self)
}

/// To call [Usage] group related APIs using this client.
pub fn usage(&self) -> Usage<'_, C> {
Usage::new(self)
}

/// To call [Responses] group related APIs using this client.
pub fn responses(&self) -> Responses<'_, C> {
Responses::new(self)
Expand Down
4 changes: 3 additions & 1 deletion async-openai/src/completion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ use crate::{
client::Client,
config::Config,
error::OpenAIError,
types::{CompletionResponseStream, CreateCompletionRequest, CreateCompletionResponse},
types::completions::{
CompletionResponseStream, CreateCompletionRequest, CreateCompletionResponse,
},
RequestOptions,
};

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
use crate::{
config::Config,
container_files::ContainerFiles,
error::OpenAIError,
types::containers::{
ContainerListResource, ContainerResource, CreateContainerRequest, DeleteContainerResponse,
},
Client, RequestOptions,
Client, ContainerFiles, RequestOptions,
};

pub struct Containers<'c, C: Config> {
Expand Down
5 changes: 5 additions & 0 deletions async-openai/src/containers/mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
mod container_files;
mod containers_;

pub use container_files::*;
pub use containers_::*;
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
use crate::{
config::Config,
error::OpenAIError,
eval_run_output_items::EvalRunOutputItems,
types::evals::{CreateEvalRunRequest, DeleteEvalRunResponse, EvalRun, EvalRunList},
Client, RequestOptions,
Client, EvalRunOutputItems, RequestOptions,
};

pub struct EvalRuns<'c, C: Config> {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
use crate::{
config::Config,
error::OpenAIError,
eval_runs::EvalRuns,
types::evals::{CreateEvalRequest, DeleteEvalResponse, Eval, EvalList, UpdateEvalRequest},
Client, RequestOptions,
Client, EvalRuns, RequestOptions,
};

/// Create, manage, and run evals in the OpenAI platform. Related guide:
Expand Down
7 changes: 7 additions & 0 deletions async-openai/src/evals/mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
mod eval_run_output_items;
mod eval_runs;
mod evals_;

pub use eval_run_output_items::*;
pub use eval_runs::*;
pub use evals_::*;
72 changes: 36 additions & 36 deletions async-openai/src/impls.rs
Original file line number Diff line number Diff line change
@@ -1,56 +1,56 @@
use crate::{
admin_api_keys::AdminAPIKeys,
admin::AdminAPIKeys,
admin::AuditLogs,
admin::Certificates,
admin::GroupRoles,
admin::GroupUsers,
admin::Groups,
admin::Invites,
admin::ProjectAPIKeys,
admin::ProjectCertificates,
admin::ProjectGroupRoles,
admin::ProjectGroups,
admin::ProjectRateLimits,
admin::ProjectRoles,
admin::ProjectServiceAccounts,
admin::ProjectUserRoles,
admin::ProjectUsers,
admin::Projects,
admin::Roles,
admin::Usage,
admin::UserRoles,
admin::Users,
assistants::Assistants,
assistants::Messages,
assistants::Runs,
assistants::Steps,
assistants::Threads,
audio::Audio,
audit_logs::AuditLogs,
audio::Speech,
audio::Transcriptions,
audio::Translations,
batches::Batches,
certificates::Certificates,
chat::Chat,
chatkit::{Chatkit, ChatkitSessions, ChatkitThreads},
completion::Completions,
container_files::ContainerFiles,
containers::ContainerFiles,
containers::Containers,
conversation_items::ConversationItems,
conversations::Conversations,
embedding::Embeddings,
eval_run_output_items::EvalRunOutputItems,
eval_runs::EvalRuns,
evals::EvalRunOutputItems,
evals::EvalRuns,
evals::Evals,
file::Files,
fine_tuning::FineTuning,
group_roles::GroupRoles,
group_users::GroupUsers,
groups::Groups,
image::Images,
invites::Invites,
messages::Messages,
model::Models,
moderation::Moderations,
project_api_keys::ProjectAPIKeys,
project_certificates::ProjectCertificates,
project_group_roles::ProjectGroupRoles,
project_groups::ProjectGroups,
project_rate_limits::ProjectRateLimits,
project_roles::ProjectRoles,
project_service_accounts::ProjectServiceAccounts,
project_user_roles::ProjectUserRoles,
project_users::ProjectUsers,
projects::Projects,
responses::ConversationItems,
responses::Conversations,
responses::Responses,
roles::Roles,
runs::Runs,
speech::Speech,
steps::Steps,
threads::Threads,
transcriptions::Transcriptions,
translations::Translations,
uploads::Uploads,
usage::Usage,
user_roles::UserRoles,
users::Users,
vector_store_file_batches::VectorStoreFileBatches,
vector_store_files::VectorStoreFiles,
vector_stores::VectorStores,
vectorstores::VectorStoreFileBatches,
vectorstores::VectorStoreFiles,
vectorstores::VectorStores,
video::Videos,
};

Expand Down
Loading
Loading