Commit 6e7d513
committed
Add outputFormat and outputCompression to OpenAiSdkImageOptions
Add support for outputFormat and outputCompression parameters in
image generation using the OpenAI SDK. These options allow users
to specify the output format (png, jpeg, webp) and compression
level for generated images, which is supported by the gpt-image-1
model.
Changes:
* Add outputFormat and outputCompression fields to OpenAiSdkImageOptions
* Add getters, setters, and builder methods for the new fields
* Update equals, hashCode, and toString methods
* Update toOpenAiImageGenerateParams to include the new parameters
* Update Builder.from() and Builder.merge() to handle new fields
* Add test coverage for the new properties
* Update documentation with new properties and gpt-image-1 example
Signed-off-by: Igor Bari <[email protected]>1 parent bf5ebce commit 6e7d513
File tree
3 files changed
+91
-5
lines changed- auto-configurations/models/spring-ai-autoconfigure-model-openai-sdk/src/test/java/org/springframework/ai/model/openaisdk/autoconfigure
- models/spring-ai-openai-sdk/src/main/java/org/springframework/ai/openaisdk
- spring-ai-docs/src/main/antora/modules/ROOT/pages/api/image
3 files changed
+91
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
105 | | - | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
106 | 108 | | |
107 | 109 | | |
108 | 110 | | |
| |||
122 | 124 | | |
123 | 125 | | |
124 | 126 | | |
| 127 | + | |
| 128 | + | |
125 | 129 | | |
126 | 130 | | |
127 | 131 | | |
| |||
Lines changed: 57 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
85 | 96 | | |
86 | 97 | | |
87 | 98 | | |
| |||
160 | 171 | | |
161 | 172 | | |
162 | 173 | | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
163 | 190 | | |
164 | 191 | | |
165 | 192 | | |
| |||
169 | 196 | | |
170 | 197 | | |
171 | 198 | | |
172 | | - | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
173 | 202 | | |
174 | 203 | | |
175 | 204 | | |
176 | 205 | | |
177 | 206 | | |
178 | | - | |
| 207 | + | |
179 | 208 | | |
180 | 209 | | |
181 | 210 | | |
182 | 211 | | |
183 | 212 | | |
184 | 213 | | |
185 | | - | |
| 214 | + | |
| 215 | + | |
186 | 216 | | |
187 | 217 | | |
188 | 218 | | |
| |||
220 | 250 | | |
221 | 251 | | |
222 | 252 | | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
223 | 259 | | |
224 | 260 | | |
225 | 261 | | |
| |||
256 | 292 | | |
257 | 293 | | |
258 | 294 | | |
| 295 | + | |
| 296 | + | |
259 | 297 | | |
260 | 298 | | |
261 | 299 | | |
| |||
322 | 360 | | |
323 | 361 | | |
324 | 362 | | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
325 | 369 | | |
326 | 370 | | |
327 | 371 | | |
| |||
421 | 465 | | |
422 | 466 | | |
423 | 467 | | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
424 | 478 | | |
425 | 479 | | |
426 | 480 | | |
| |||
Lines changed: 29 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
191 | 191 | | |
192 | 192 | | |
193 | 193 | | |
194 | | - | |
| 194 | + | |
195 | 195 | | |
196 | 196 | | |
197 | 197 | | |
| |||
200 | 200 | | |
201 | 201 | | |
202 | 202 | | |
| 203 | + | |
| 204 | + | |
203 | 205 | | |
204 | 206 | | |
205 | 207 | | |
| |||
229 | 231 | | |
230 | 232 | | |
231 | 233 | | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
232 | 260 | | |
233 | 261 | | |
234 | 262 | | |
| |||
0 commit comments