-
Notifications
You must be signed in to change notification settings - Fork 1.9k
feat: add streaming support and new GPT-Image models for OpenAI #4579
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
Draft
apappascs
wants to merge
14
commits into
spring-projects:main
Choose a base branch
from
apappascs:feat/openai-image-models
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
feat: add streaming support and new GPT-Image models for OpenAI #4579
apappascs
wants to merge
14
commits into
spring-projects:main
from
apappascs:feat/openai-image-models
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ameters Add support for OpenAI's new GPT Image models (gpt-image-1 and gpt-image-1-mini) with all new model-specific parameters according to the official API specification. Changes: - Add GPT_IMAGE_1 and GPT_IMAGE_1_MINI to ImageModel enum - Update default image model from DALL_E_3 to GPT_IMAGE_1_MINI - Add 6 new gpt-image-1 specific parameters to OpenAiImageRequest: * background: transparency control (transparent/opaque/auto) * moderation: content moderation level (low/auto) * outputCompression: compression level 0-100% for webp/jpeg * outputFormat: output format (png/jpeg/webp) * partialImages: streaming partial images support (0-3) * stream: enable streaming mode - Update OpenAiImageOptions with new fields, getters/setters, and builder methods - Update documentation to reflect model-specific parameter support - Add comprehensive integration tests (OpenAiImageApiIT) with parameterized tests - Update existing tests to use new default model Breaking Changes: - Default image model changed from DALL_E_3 to GPT_IMAGE_1_MINI - OpenAiImageRequest constructor signature updated with 6 new parameters Reference: https://platform.openai.com/docs/models Signed-off-by: Alexandros Pappas <[email protected]>
Signed-off-by: Alexandros Pappas <[email protected]>
Signed-off-by: Alexandros Pappas <[email protected]>
Signed-off-by: Alexandros Pappas <[email protected]>
Signed-off-by: Alexandros Pappas <[email protected]>
Signed-off-by: Alexandros Pappas <[email protected]>
Signed-off-by: Alexandros Pappas <[email protected]>
Signed-off-by: Alexandros Pappas <[email protected]>
Signed-off-by: Alexandros Pappas <[email protected]>
Signed-off-by: Alexandros Pappas <[email protected]>
Signed-off-by: Alexandros Pappas <[email protected]>
Signed-off-by: Alexandros Pappas <[email protected]>
323b814
to
ad9ab1e
Compare
Signed-off-by: Alexandros Pappas <[email protected]>
Signed-off-by: Alexandros Pappas <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add support for OpenAI's new GPT-Image models (gpt-image-1 and gpt-image-1-mini) with streaming image generation capabilities and all new model-specific parameters according to the official API specification.
Changes:
Core Interface & API Layer:
Model Layer:
Parameters & Options:
Testing:
Auto-configuration & CI:
Documentation:
Reference: https://platform.openai.com/docs/models
https://platform.openai.com/docs/api-reference/images-streaming
https://platform.openai.com/docs/guides/image-generation?image-generation-model=gpt-image-1&api=image