Skip to content

Conversation

@ilayaperumalg
Copy link
Member

  • 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");
Copy link
Contributor

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");
Copy link
Contributor

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");
Copy link
Contributor

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");
Copy link
Contributor

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]>
@ilayaperumalg ilayaperumalg force-pushed the openai-api-builder-changes branch from 795964f to 89dd0e4 Compare February 13, 2025 11:24
@ilayaperumalg
Copy link
Member Author

This is merged as a528253

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.

3 participants