-
Notifications
You must be signed in to change notification settings - Fork 205
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
In memory files #154
Merged
Merged
In memory files #154
Conversation
This file contains 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
Thank you this is nice work, and example makes my life easy to test :) |
katya4oyu
pushed a commit
to katya4oyu/async-openai
that referenced
this pull request
Nov 25, 2023
* Added ability to use in-memory files (Bytes, vec[u8]) * Removed unnecessary trait impls * Polished example
ifsheldon
added a commit
to ifsheldon/async-openai-wasm
that referenced
this pull request
Nov 26, 2023
and configure feature gates for items in a finer-grained level. Thanks to PR 64bit#154
ifsheldon
added a commit
to ifsheldon/async-openai-wasm
that referenced
this pull request
Nov 26, 2023
and configure feature gates for items in a finer-grained level. Thanks to PR 64bit#154
64bit
added a commit
that referenced
this pull request
Nov 26, 2023
* Update to Assistants example (#146) * Update to Assistants example * Update examples/assistants/src/main.rs update api config for consistency and secutity Co-authored-by: Himanshu Neema <[email protected]> * added assistant creation * exit, deconstruct assistant, improved readme --------- Co-authored-by: Himanshu Neema <[email protected]> * Add examples tool-call and tool-call-stream (#153) * add names (#150) * Link to openai-func-enums (#152) * Link to openai-func-enums * Link to openai-func-enums * Update async-openai/README.md --------- Co-authored-by: Himanshu Neema <[email protected]> * In memory files (#154) * Added ability to use in-memory files (Bytes, vec[u8]) * Removed unnecessary trait impls * Polished example * Spec, readme, and crate description updates (#156) * get latest spec * update description * add WASM * WASM support on experiments branch * chore: Release * Make tool choice lower case (#158) * Fix: post_form to be Sendable (#157) * changed to allow Send. * add simple tests for sendable * fix test name * chore: Release * conservatively add feature gates to fix wasm compile error due to merge * Re-enable media operation in wasm and configure feature gates for items in a finer-grained level. Thanks to PR #154 --------- Co-authored-by: Gravel Hill <[email protected]> Co-authored-by: Himanshu Neema <[email protected]> Co-authored-by: Frank Fralick <[email protected]> Co-authored-by: Sam F <[email protected]> Co-authored-by: David Weis <[email protected]> Co-authored-by: yykt <[email protected]>
64bit
added a commit
that referenced
this pull request
Jan 8, 2024
* Update to Assistants example (#146) * Update to Assistants example * Update examples/assistants/src/main.rs update api config for consistency and secutity Co-authored-by: Himanshu Neema <[email protected]> * added assistant creation * exit, deconstruct assistant, improved readme --------- Co-authored-by: Himanshu Neema <[email protected]> * Add examples tool-call and tool-call-stream (#153) * add names (#150) * Link to openai-func-enums (#152) * Link to openai-func-enums * Link to openai-func-enums * Update async-openai/README.md --------- Co-authored-by: Himanshu Neema <[email protected]> * In memory files (#154) * Added ability to use in-memory files (Bytes, vec[u8]) * Removed unnecessary trait impls * Polished example * Spec, readme, and crate description updates (#156) * get latest spec * update description * add WASM * WASM support on experiments branch * chore: Release * Make tool choice lower case (#158) * Fix: post_form to be Sendable (#157) * changed to allow Send. * add simple tests for sendable * fix test name * chore: Release * Add support for rustls-webpki-roots (#168) * Refactor `types` module (#170) * Document `impl_from!` macro * Fix up `impl_from!` docs * Documents `impl_default!` macro * Document `impl_input!` macro * Factor out types from `assistants` module in `types` * Factor out `model` * Factor out `audio` * Factor out `image` * Factor out `file` * Factor out `fine_tune` * Factor out `moderation` * Factor out `edit` * Factor out `fine_tuning` * Factor out missed `DeleteModelResponse` into `model` * Factor out `embedding` * Factor out `chat` * Factor out `completion` and eliminate `types` * Satisfy clippy --------- Co-authored-by: Sharif Haason <[email protected]> * Sync updates from Spec (#171) * updates to doc comments and types * deprecated * update ChatCompletionFunctions to FunctionObject * More type updates * add logprobs field * update from spec * updated spec * fixes suggested by cargo clippy * add query param to list files (#172) * chore: Release * Optional model in ModifyAssistantRequest (#174) All fields (including model) are optional in OpenAI API. * fix duplicate import due to merge * fix stream object * bring back feature gates lost due to merge * delete old types.rs --------- Co-authored-by: Gravel Hill <[email protected]> Co-authored-by: Himanshu Neema <[email protected]> Co-authored-by: Frank Fralick <[email protected]> Co-authored-by: Sam F <[email protected]> Co-authored-by: David Weis <[email protected]> Co-authored-by: yykt <[email protected]> Co-authored-by: XTY <[email protected]> Co-authored-by: sharif <[email protected]> Co-authored-by: Sharif Haason <[email protected]> Co-authored-by: Sebastian Sosa <[email protected]>
64bit
added a commit
that referenced
this pull request
Jan 31, 2024
* Update to Assistants example (#146) * Update to Assistants example * Update examples/assistants/src/main.rs update api config for consistency and secutity Co-authored-by: Himanshu Neema <[email protected]> * added assistant creation * exit, deconstruct assistant, improved readme --------- Co-authored-by: Himanshu Neema <[email protected]> * Add examples tool-call and tool-call-stream (#153) * add names (#150) * Link to openai-func-enums (#152) * Link to openai-func-enums * Link to openai-func-enums * Update async-openai/README.md --------- Co-authored-by: Himanshu Neema <[email protected]> * In memory files (#154) * Added ability to use in-memory files (Bytes, vec[u8]) * Removed unnecessary trait impls * Polished example * Spec, readme, and crate description updates (#156) * get latest spec * update description * add WASM * WASM support on experiments branch * chore: Release * Make tool choice lower case (#158) * Fix: post_form to be Sendable (#157) * changed to allow Send. * add simple tests for sendable * fix test name * chore: Release * Add support for rustls-webpki-roots (#168) * Refactor `types` module (#170) * Document `impl_from!` macro * Fix up `impl_from!` docs * Documents `impl_default!` macro * Document `impl_input!` macro * Factor out types from `assistants` module in `types` * Factor out `model` * Factor out `audio` * Factor out `image` * Factor out `file` * Factor out `fine_tune` * Factor out `moderation` * Factor out `edit` * Factor out `fine_tuning` * Factor out missed `DeleteModelResponse` into `model` * Factor out `embedding` * Factor out `chat` * Factor out `completion` and eliminate `types` * Satisfy clippy --------- Co-authored-by: Sharif Haason <[email protected]> * Sync updates from Spec (#171) * updates to doc comments and types * deprecated * update ChatCompletionFunctions to FunctionObject * More type updates * add logprobs field * update from spec * updated spec * fixes suggested by cargo clippy * add query param to list files (#172) * chore: Release * Optional model in ModifyAssistantRequest (#174) All fields (including model) are optional in OpenAI API. * update contribution guidelines (#182) * update contribution guidelines * fix link * update * consistency * Code of conduct * chore: Release * fix file test by providing query param * Added dimensions param to embedding request (#185) * chore: Release --------- Co-authored-by: Gravel Hill <[email protected]> Co-authored-by: Himanshu Neema <[email protected]> Co-authored-by: Frank Fralick <[email protected]> Co-authored-by: Sam F <[email protected]> Co-authored-by: David Weis <[email protected]> Co-authored-by: yykt <[email protected]> Co-authored-by: XTY <[email protected]> Co-authored-by: sharif <[email protected]> Co-authored-by: Sharif Haason <[email protected]> Co-authored-by: Sebastian Sosa <[email protected]> Co-authored-by: vmg-dev <[email protected]>
64bit
added a commit
that referenced
this pull request
Apr 10, 2024
* Update to Assistants example (#146) * Update to Assistants example * Update examples/assistants/src/main.rs update api config for consistency and secutity Co-authored-by: Himanshu Neema <[email protected]> * added assistant creation * exit, deconstruct assistant, improved readme --------- Co-authored-by: Himanshu Neema <[email protected]> * Add examples tool-call and tool-call-stream (#153) * add names (#150) * Link to openai-func-enums (#152) * Link to openai-func-enums * Link to openai-func-enums * Update async-openai/README.md --------- Co-authored-by: Himanshu Neema <[email protected]> * In memory files (#154) * Added ability to use in-memory files (Bytes, vec[u8]) * Removed unnecessary trait impls * Polished example * Spec, readme, and crate description updates (#156) * get latest spec * update description * add WASM * WASM support on experiments branch * chore: Release * Make tool choice lower case (#158) * Fix: post_form to be Sendable (#157) * changed to allow Send. * add simple tests for sendable * fix test name * chore: Release * Add support for rustls-webpki-roots (#168) * Refactor `types` module (#170) * Document `impl_from!` macro * Fix up `impl_from!` docs * Documents `impl_default!` macro * Document `impl_input!` macro * Factor out types from `assistants` module in `types` * Factor out `model` * Factor out `audio` * Factor out `image` * Factor out `file` * Factor out `fine_tune` * Factor out `moderation` * Factor out `edit` * Factor out `fine_tuning` * Factor out missed `DeleteModelResponse` into `model` * Factor out `embedding` * Factor out `chat` * Factor out `completion` and eliminate `types` * Satisfy clippy --------- Co-authored-by: Sharif Haason <[email protected]> * Sync updates from Spec (#171) * updates to doc comments and types * deprecated * update ChatCompletionFunctions to FunctionObject * More type updates * add logprobs field * update from spec * updated spec * fixes suggested by cargo clippy * add query param to list files (#172) * chore: Release * Optional model in ModifyAssistantRequest (#174) All fields (including model) are optional in OpenAI API. * update contribution guidelines (#182) * update contribution guidelines * fix link * update * consistency * Code of conduct * chore: Release * fix file test by providing query param * Added dimensions param to embedding request (#185) * chore: Release * fix: CreateTranscriptionRequest language field not convert (#188) * chore: Release * Add usage information to the run object (#195) * Updates from Spec (#196) * updates from spec * remove Edits * remove Fine-Tunes (was deprecated) * update spec * cargo fix * cargo fmt * chore: Release * Add Client::build for full customizability during instantiation (#197) * Change std::sleep to tokio's sleep (#200) * chore: Release * add support for base64 embeddings (#190) * add support for base64 embeddings * Base64Embedding is an implementation detail * feat: separate Embeddings::create_base64 method * chore: use newtype for hosting base64 decoding instead * chore: remove unused error variant * Add vision-chat example (#203) Example matches quickstart from https://platform.openai.com/docs/guides/vision It showcases struct derived from ChatCompletionRequestMessageContent * Update Audio APIs from updated spec (#202) * Implement CreateTranscriptRequest::response_granularities This PR adds support for `AudioResponseFormat::VerboseJson` and `TimestampGranularity`, including updated example code. These were defined as types before, but not fully implemented. Implements #201. * Modify transcription API to be more like spec - Rename `CreateTranscriptionRespose` to `CreateTranscriptionResponseJson` (to match API spec) - Add `CreateTranscriptionResponseVerboseJson` and `transcribe_verbose_json` - Add `transcribe_raw` for SRT output - Add `post_form_raw` - Update example code * Upgrade dependencies: Rust crates in Cargo.toml (#204) * upgrade reqwest * update reqwest-eventsource * cargo test working (#207) * fix: cargo fmt and compiler warnings fixes (#208) * cargo fmt * fix imports * chore: Release * fixed problems due to code sync * update worker dependency to resolve build issue * update test to fix test compilation issue * add conditional imports * change default of InputSource and bring back builders of file-related structs * update doc --------- Co-authored-by: Gravel Hill <[email protected]> Co-authored-by: Himanshu Neema <[email protected]> Co-authored-by: Frank Fralick <[email protected]> Co-authored-by: Sam F <[email protected]> Co-authored-by: David Weis <[email protected]> Co-authored-by: yykt <[email protected]> Co-authored-by: XTY <[email protected]> Co-authored-by: sharif <[email protected]> Co-authored-by: Sharif Haason <[email protected]> Co-authored-by: Sebastian Sosa <[email protected]> Co-authored-by: vmg-dev <[email protected]> Co-authored-by: TAO <[email protected]> Co-authored-by: turingbuilder <[email protected]> Co-authored-by: Gabriel Bianconi <[email protected]> Co-authored-by: Santhanagopalan Krishnamoorthy <[email protected]> Co-authored-by: Adrien Wald <[email protected]> Co-authored-by: Gabriel <[email protected]> Co-authored-by: Eric Kidd <[email protected]> Co-authored-by: Samuel Batissou Tiburcio <[email protected]>
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.
As per #144, added ability to pass Bytes or vec[u8]s directly for ImageInputs, FileInputs, and AudioInputs.