Skip to content

Commit d334163

Browse files
authored
Merge pull request #635 from devforth/feature/AdminForth/1629/search-bulk-ai-pluggin-problem
fix: update documentation for bulk ai plugin
2 parents fc4d1ed + 8eb1ace commit d334163

1 file changed

Lines changed: 40 additions & 0 deletions

File tree

adminforth/documentation/docs/tutorial/08-Plugins/17-bulk-ai-flow.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,31 @@ new BulkAiFlowPlugin({
283283
}),
284284
```
285285
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+
new ImageGenerationAdapterOpenAI({
298+
openAiApiKey: process.env.OPENAI_API_KEY as string,
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+
286311
## Rate Limiting and Best Practices
287312
288313
- 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
429454
430455
And there won't be more than 5 parallel requests being handled.
431456
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+
new BulkAiFlowPlugin({
463+
actionName: 'Generate description and Price',
464+
465+
//diff-add
466+
pageSize: 10, // default is 6
467+
468+
// ...
469+
}),
470+
```
471+
432472
## Confirming long-running generations
433473
434474
For very large datasets, you can pause generation at specific checkpoints so users can review results before continuing.

0 commit comments

Comments
 (0)