Skip to content

feat: Bring your own types #342

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
merged 70 commits into from
Mar 3, 2025
Merged

feat: Bring your own types #342

merged 70 commits into from
Mar 3, 2025

Conversation

64bit
Copy link
Owner

@64bit 64bit commented Mar 3, 2025

Enabled extra methods with similar signature but with generic parameters.
Generic parameter allows user to bring their own custom types to use for request or response.

These methods are have same name as original with _byot suffix.

This can be enabled by feature flag byot

@64bit 64bit merged commit 638bf75 into main Mar 3, 2025
@64bit 64bit deleted the bring-your-own-types branch March 3, 2025 02:32
Sevenannn pushed a commit to spiceai/async-openai that referenced this pull request Mar 4, 2025
* attribute proc macro to bring your own types

* keep original fn as it is add new with _byot suffix

* update macro

* update macro

* use macro in main crate + add test

* byot: assistants

* byot: vector_stores

* add where_clause attribute arg

* remove print

* byot: files

* byot: images

* add stream arg to attribute

* byot: chat

* byot: completions

* fix comment

* fix

* byot: audio

* byot: embeddings

* byot: Fine Tunning

* add byot tests

* byot: moderations

* byot tests: moderations

* byot: threads

* byot tests: threads

* byot: messages

* byot tests: messages

* byot: runs

* byot tests: runs

* byot: steps

* byot tests: run steps

* byot: vector store files

* byot test: vector store files

* byot: vector store file batches

* byot test: vector store file batches

* cargo fmt

* byot: batches

* byot tests: batches

* format

* remove AssistantFiles and related apis (/assistants/assistant_id/files/..)

* byot: audit logs

* byot tests: audit logs

* keep non byot code checks

* byot: invites

* byot tests: invites

* remove message files API

* byot: project api keys

* byot tests: project api keys

* byot: project service accounts

* byot tests: project service accounts

* byot: project users

* byot tests: project users

* byot: projects

* byot tests: projects

* byot: uploads

* byot tests: uploads

* byot: users

* byot tests: users

* add example to demonstrate bring-your-own-types

* update README

* update doc

* cargo fmt

* update doc in lib.rs

* tests passing

* fix for complier warning

* fix compiler #[allow(unused_mut)]

* cargo fix

* fix all warnings

* add Voices

* publish = false for all examples

* specify versions
kahosan pushed a commit to kahosan/async-openai that referenced this pull request Mar 7, 2025
* attribute proc macro to bring your own types

* keep original fn as it is add new with _byot suffix

* update macro

* update macro

* use macro in main crate + add test

* byot: assistants

* byot: vector_stores

* add where_clause attribute arg

* remove print

* byot: files

* byot: images

* add stream arg to attribute

* byot: chat

* byot: completions

* fix comment

* fix

* byot: audio

* byot: embeddings

* byot: Fine Tunning

* add byot tests

* byot: moderations

* byot tests: moderations

* byot: threads

* byot tests: threads

* byot: messages

* byot tests: messages

* byot: runs

* byot tests: runs

* byot: steps

* byot tests: run steps

* byot: vector store files

* byot test: vector store files

* byot: vector store file batches

* byot test: vector store file batches

* cargo fmt

* byot: batches

* byot tests: batches

* format

* remove AssistantFiles and related apis (/assistants/assistant_id/files/..)

* byot: audit logs

* byot tests: audit logs

* keep non byot code checks

* byot: invites

* byot tests: invites

* remove message files API

* byot: project api keys

* byot tests: project api keys

* byot: project service accounts

* byot tests: project service accounts

* byot: project users

* byot tests: project users

* byot: projects

* byot tests: projects

* byot: uploads

* byot tests: uploads

* byot: users

* byot tests: users

* add example to demonstrate bring-your-own-types

* update README

* update doc

* cargo fmt

* update doc in lib.rs

* tests passing

* fix for complier warning

* fix compiler #[allow(unused_mut)]

* cargo fix

* fix all warnings

* add Voices

* publish = false for all examples

* specify versions
ifsheldon pushed a commit to ifsheldon/async-openai-wasm that referenced this pull request Jun 2, 2025
* attribute proc macro to bring your own types

* keep original fn as it is add new with _byot suffix

* update macro

* update macro

* use macro in main crate + add test

* byot: assistants

* byot: vector_stores

* add where_clause attribute arg

* remove print

* byot: files

* byot: images

* add stream arg to attribute

* byot: chat

* byot: completions

* fix comment

* fix

* byot: audio

* byot: embeddings

* byot: Fine Tunning

* add byot tests

* byot: moderations

* byot tests: moderations

* byot: threads

* byot tests: threads

* byot: messages

* byot tests: messages

* byot: runs

* byot tests: runs

* byot: steps

* byot tests: run steps

* byot: vector store files

* byot test: vector store files

* byot: vector store file batches

* byot test: vector store file batches

* cargo fmt

* byot: batches

* byot tests: batches

* format

* remove AssistantFiles and related apis (/assistants/assistant_id/files/..)

* byot: audit logs

* byot tests: audit logs

* keep non byot code checks

* byot: invites

* byot tests: invites

* remove message files API

* byot: project api keys

* byot tests: project api keys

* byot: project service accounts

* byot tests: project service accounts

* byot: project users

* byot tests: project users

* byot: projects

* byot tests: projects

* byot: uploads

* byot tests: uploads

* byot: users

* byot tests: users

* add example to demonstrate bring-your-own-types

* update README

* update doc

* cargo fmt

* update doc in lib.rs

* tests passing

* fix for complier warning

* fix compiler #[allow(unused_mut)]

* cargo fix

* fix all warnings

* add Voices

* publish = false for all examples

* specify versions

(cherry picked from commit 638bf75)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant