Skip to content

Commit 9a7bac9

Browse files
committed
docs: support output size
1 parent aea7e01 commit 9a7bac9

File tree

1 file changed

+13
-7
lines changed
  • adminforth/documentation/docs/tutorial/05-Plugins

1 file changed

+13
-7
lines changed

adminforth/documentation/docs/tutorial/05-Plugins/05-upload.md

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,8 @@ new UploadPlugin({
280280
}),
281281
//diff-add
282282
fieldsForContext: ['title'],
283+
//diff-add
284+
outputSize: '1536x1024' // size of generated image
283285

284286
},
285287
```
@@ -288,23 +290,26 @@ Here is how it works:
288290
289291
![alt text](demoImgGen-1.gif)
290292
291-
You can also pass additional parameters to OpenAI API call
293+
You can also pass additional parameters to [OpenAI API call](https://platform.openai.com/docs/api-reference/images/createEdit) by using `extraParams` property:
292294
293295
294296
```ts title="./apartments.ts"
295297
new ImageGenerationAdapterOpenAI({
296298
//diff-add
297-
openAiApiKey: process.env.OPENAI_API_KEY as string,
299+
openAiApiKey: process.env.OPENAI_API_KEY as string,
298300
//diff-add
299-
model: 'gpt-image-1',
301+
model: 'gpt-image-1',
300302
//diff-add
301-
extraParams: {
303+
extraParams: {
302304
//diff-add
303-
moderation: 'low',
305+
moderation: 'low',
304306
//diff-add
305-
quality: 'high',
307+
quality: 'high',
306308
//diff-add
307-
}),
309+
},
310+
//diff-add
311+
outputSize: '1536x1024' // size of generated image
312+
}),
308313
```
309314
310315
@@ -330,6 +335,7 @@ generation: {
330335
},
331336
generationPrompt: "Remove text from the image",
332337
countToGenerate: 3,
338+
outputSize: '1024x1024',
333339
}
334340
```
335341

0 commit comments

Comments
 (0)