-
Notifications
You must be signed in to change notification settings - Fork 4.8k
fix(types): add missing fields to ImageGenerationCall response types #3233
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -53,6 +53,21 @@ class ImageGenerationCall(BaseModel): | |
| type: Literal["image_generation_call"] | ||
| """The type of the image generation call. Always `image_generation_call`.""" | ||
|
|
||
| background: Optional[Literal["transparent", "opaque", "auto"]] = None | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The conversations item endpoints cast returned items to Useful? React with 👍 / 👎. |
||
| """The background setting used for the generated image.""" | ||
|
|
||
| output_format: Optional[Literal["png", "webp", "jpeg"]] = None | ||
| """The output format of the generated image.""" | ||
|
|
||
| quality: Optional[Literal["low", "medium", "high", "auto"]] = None | ||
| """The quality setting used for the generated image.""" | ||
|
|
||
| revised_prompt: Optional[str] = None | ||
| """The revised prompt that was used to generate the image, if applicable.""" | ||
|
|
||
| size: Optional[Literal["1024x1024", "1024x1536", "1536x1024", "auto"]] = None | ||
| """The size of the generated image.""" | ||
|
|
||
|
|
||
| class LocalShellCallAction(BaseModel): | ||
| """Execute a shell command on the server.""" | ||
|
|
||
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.
This updates
response_input_item_param.py, but the mainclient.responses.create(...)overloads importResponseInputParamfromsrc/openai/types/responses/response_input_param.py, which contains a duplicateImageGenerationCallTypedDict that still lacks these keys. In the common case of feeding a returnedimage_generation_callitem back throughresponses.create(input=[...]), type checkers will still rejectbackground,output_format,quality,revised_prompt, andsize; add the same fields to the duplicateresponse_input_param.pydefinition as well.Useful? React with 👍 / 👎.