-
-
Notifications
You must be signed in to change notification settings - Fork 338
feat: ergonomics, consistency and contained types #491
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ifsheldon
pushed a commit
to ifsheldon/async-openai-wasm
that referenced
this pull request
Nov 28, 2025
* pattern for shared types: FunctionObject * shared FunctionName * shared ResponseFormat and ResponseFormatJsonSchema * shared ImageDetail * shared ImageUrl * shared FunctionCall * consistent imports * consistent imports * consistent imports * consistent impls for assistants * cleanup OrganizationRole from common.rs * rename assistant_stream.rs -> stream.rs * rename audio_types.rs -> audio.rs * shared LogProbProperties * clean import * shared ResponseUsage * rename chat_types.rs -> chat.rs * shared CustomGrammarFormatParam * embedding impls in impls.rs * shared ImageDetail in responses * shared ReasoningEffort * import cleanup * shared CompletionTokenDetails and PromptTokenDetails * shared Filter; ComparisonFilter; CompoundFilter * shared StaticChunkingStrategy * shared ImageInput * shared::ImageInput in impls.rs * mcp types in its own module * completions in its own types::completions module * updated completions examples * fix responses example * doc comment * webhook.rs in its own types/webhooks * move mcp.rs to types/mcp * shared TranscriptionUsage * cargo fmt * fix test compilation * rename tests * Usage api under client.admin().usage() instead of client.usage() * update admin usage example * move admin APIs in admin src/admin * move audio apis in src/audio * move assistants apis in src/assistants * vectore stores apis in src/vectorstores * fix byot test from client.usage() to client.admin().usage() * evals apis in src/evals * move container and container files apis in src/containers * move responses api to src/responses * admin types consistent with rest of the crate * cargo clippy change name of contained module (cherry picked from commit 8ca8ac5)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Restructure project such that types for an API group are self contained - move shared types into shared folder and re-export them in the used modules.
For example
ImageDetailtype is used inresponsesandchattypes - it is reexported from library astypes::chat::ImageDetailandtypes::responses::ImageDetail.Misc:
src/admincontains all admin API groups,src/vectorstorescontains all Vector store related API groups.list()call) inapi.rsfiles.