Skip to content

fix(dalle): Add tests and fix issue 106 quality param handling #109

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

andrasfe
Copy link

@andrasfe andrasfe commented Jun 11, 2025

Summary

Fixed issue #106 as follows: for dall-e-2 (default), I ignore it. For dall-e-3, it takes it into consideration. Confirmed with both version and added unit tests that also validate the changes. As there were no unit tests at all, I added one file with the appropriate tests. My assumption is subsequent dall-e versions will accept the quality parameter, so it is - hopefully - future proofed.

Changes

  • Conditional quality parameter: The run method in dalle_image_generator.py has been updated to conditionally include the quality parameter only when the selected model is not dall-e-2. This prevents an API error while maintaining functionality for DALL-E 3 and future models.
  • Unit Tests: A new test file, test_dalle_image_generator.py, has been added
  • Linting: validated

Closes Issue #106

@andrasfe
Copy link
Author

@ccurme - can you please advise? thanks!

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