You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: adminforth/documentation/docs/tutorial/08-Plugins/17-bulk-ai-flow.md
+40Lines changed: 40 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -283,6 +283,31 @@ new BulkAiFlowPlugin({
283
283
}),
284
284
```
285
285
286
+
## Image generation quality
287
+
288
+
`ImageGenerationAdapterOpenAI` accepts an `extraParams` object that is passed directly to the OpenAI API. The most useful option here is `quality`, which controls the fidelity and cost of each generated image:
289
+
290
+
| Value | Description |
291
+
|-------|-------------|
292
+
| `'low'` | Fastest generation, lowest cost. Good for drafts or high-volume batch jobs where speed matters more than visual fidelity. |
293
+
| `'medium'` | Balanced quality and speed. A sensible default for most use cases. |
294
+
| `'high'` | Best image quality, slowest and most expensive. Use for final promotional assets or when visual detail is critical. |
295
+
296
+
```ts
297
+
newImageGenerationAdapterOpenAI({
298
+
openAiApiKey: process.env.OPENAI_API_KEYasstring,
299
+
model: 'gpt-image-1',
300
+
//diff-add
301
+
extraParams: {
302
+
//diff-add
303
+
quality: 'low', // 'low' | 'medium' | 'high'
304
+
//diff-add
305
+
},
306
+
}),
307
+
```
308
+
309
+
> ☝️ `'low'` quality is a great starting point when processing large datasets — you can always re-run generation with `'high'` for selected records once you're happy with the prompts.
310
+
286
311
## Rate Limiting and Best Practices
287
312
288
313
- Use `rateLimit` for individual image generation operations and for the bulk image generation
@@ -429,6 +454,21 @@ If you are processing large sets of data, you might want to limit the number of
429
454
430
455
And there won't be more than 5 parallel requests being handled.
431
456
457
+
## Controlling page size in the generation dialog
458
+
459
+
When users trigger bulk generation, records are displayed as cards in a paginated dialog. By default, 6 cards are shown per page. Use `pageSize` to tune this — lower values help when cards contain large images or long text, keeping the dialog fast and reviewable:
460
+
461
+
```ts
462
+
newBulkAiFlowPlugin({
463
+
actionName: 'Generate description and Price',
464
+
465
+
//diff-add
466
+
pageSize: 10, // default is 6
467
+
468
+
// ...
469
+
}),
470
+
```
471
+
432
472
## Confirming long-running generations
433
473
434
474
For very large datasets, you can pause generation at specific checkpoints so users can review results before continuing.
0 commit comments