-
Notifications
You must be signed in to change notification settings - Fork 5
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
Reorganize crate #23
Reorganize crate #23
Conversation
src/legacy/mod.rs
Outdated
@@ -0,0 +1,5 @@ | |||
mod openai_assistant_legacy; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe make it deprecated?
#[deprecated( | ||
since = "0.6.1", | ||
note = "This struct is deprecated. Please use the `assistants::OpenAIAssistant` struct for latest functionality including Assistants API v2." | ||
)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added this script to all deprecated public structs. This will result in a warning if someone is trying to use any of the struct and point them to the correct alternative.
If you run the examples marked as 'deprecated_' you will get those warnings too. There should be no warnings for the standard examples.
Now, those 'deprecated_' examples make the cargo clippy
fail. Any thoughts on what should I do with them? Suppressing deprecation warnings is an option but is that the right call? Or I can just remove the examples with deprecated structs?
mod utils; | ||
|
||
pub use crate::assistant::OpenAIAssistant; | ||
pub use crate::assistant::OpenAIAssistantVersion; | ||
#[allow(deprecated)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@darioalessandro, I had to allow deprecated for this module to make CI happy.
This PR re-organizes the crate structure to make it easier to maintain and expand in the future.
This PR does not introduce any new functionality and should be backwards compatible. Legacy structs are still accessible like they were in the past, and separate examples were created for them.
Key changes: