-
Notifications
You must be signed in to change notification settings - Fork 2k
Use ApiKey for OpenAI Image/Audio/Moderation APIs #2226
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
Use ApiKey for OpenAI Image/Audio/Moderation APIs #2226
Conversation
ilayaperumalg
commented
Feb 12, 2025
- Update to use ApiKey when instantiating OpenAI Image/Audio/Moderation APIs
- Add Builders for OpenAI Image/Audio/Moderation APIs and deprecate existing constructors
|
|
||
| public Builder apiKey(String simpleApiKey) { | ||
| Assert.notNull(simpleApiKey, "apiKey cannot be null"); | ||
| Assert.hasText(simpleApiKey, "simpleApiKey cannot be empty or null"); |
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.
Non null is fine but why empty should not be excluded, IMO
| } | ||
|
|
||
| public Builder apiKey(String simpleApiKey) { | ||
| Assert.hasText(simpleApiKey, "simpleApiKey cannot be empty or null"); |
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.
Same , empty text should be allowed?
| } | ||
|
|
||
| public Builder apiKey(String simpleApiKey) { | ||
| Assert.hasText(simpleApiKey, "simpleApiKey cannot be empty or null"); |
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.
Same , empty text should be allowed?
| } | ||
|
|
||
| public Builder apiKey(String simpleApiKey) { | ||
| Assert.hasText(simpleApiKey, "simpleApiKey cannot be empty or null"); |
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.
same
- Update to use ApiKey when instantiating OpenAI Image/Audio/Moderation APIs - Add Builders for OpenAI Image/Audio/Moderation APIs and deprecate existing constructors - Add/update tests Signed-off-by: Ilayaperumal Gopinathan <[email protected]>
- Replace hasText check with notNull for ApiKey with String value Signed-off-by: Ilayaperumal Gopinathan <[email protected]>
795964f to
89dd0e4
Compare
|
This is merged as a528253 |