Skip to content

Conversation

@JHZLO
Copy link
Contributor

@JHZLO JHZLO commented May 15, 2025

Summary

This PR removes the samples(Integer samples) method from the StabilityAiImageOptions.Builder class, as it duplicates the existing N(Integer n) method.

Motivation

  • Both samples() and N() internally call setN(), which sets the same field (samples JSON property).
  • Having both methods introduces unnecessary redundancy and may cause confusion for users.
  • N() is already consistent with the ImageOptions.getN() interface method and commonly used throughout the codebase.

Additional Notes

If needed, developers can still set the samples value using the N() method:

StabilityAiImageOptions options = StabilityAiImageOptions.builder() .N(3) .build();
samples() duplicates N(), both setting the same field. Keeping only N() simplifies the builder API and aligns with ImageOptions. Signed-off-by: Jhzlo <kjh0010703@naver.com>
@JHZLO JHZLO force-pushed the refactor-stability-ai branch from 269c310 to 690d89c Compare May 15, 2025 16:55
@markpollack markpollack added this to the 1.0.0 milestone May 15, 2025
@sobychacko
Copy link
Contributor

Merged via 8a5f68d.

@sobychacko sobychacko closed this May 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

3 participants