Skip to content

Commit 0402ac9

Browse files
committed
1 parent 1a1da91 commit 0402ac9

File tree

1 file changed

+43
-1
lines changed

1 file changed

+43
-1
lines changed

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

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,4 +381,46 @@ The user will now see a popup with a "Start generation" button and an "Edit prom
381381
![alt text](Bulk-vision-5.png)
382382
![alt text](Bulk-vision-6.png)
383383
384-
> ☝️ Updated prompts are stored in the user's local storage. Changes are local to that browser and do not affect other users or devices.
384+
> ☝️ Updated prompts are stored in the user's local storage. Changes are local to that browser and do not affect other users or devices.
385+
386+
## Processing big sets of data ( filtered records )
387+
388+
There might be cases when you want to process more records than can fit your list view.
389+
Here you can use the `recordSelector` param.
390+
It can be `checkbox` (default) or `filtered`.
391+
`filtered` uses all filtered records for generation, so you can even process the whole resource.
392+
393+
394+
```ts
395+
new BulkAiFlowPlugin({
396+
actionName: 'Generate description and Price',
397+
398+
//diff-add
399+
recordSelector: 'filtered', // default is 'checkbox'
400+
401+
...
402+
403+
});
404+
```
405+
>❗️❗️❗️ Using `recordSelector: 'filtered'` might be expensive. Before processing large data sets, we recommend starting with smaller sets to make sure everything is fine.
406+
407+
408+
## Limiting amount of parallel requests using p-limit
409+
410+
If you are processing large sets of data, you might want to limit the number of parallel requests. For this, you can use the `concurrencyLimit` param:
411+
412+
```ts
413+
new BulkAiFlowPlugin({
414+
actionName: 'Generate description and Price',
415+
416+
//diff-add
417+
concurrencyLimit: 5, //default is 10
418+
419+
...
420+
421+
});
422+
```
423+
424+
And there won't be more than 5 parallel requests being handled.
425+
426+

0 commit comments

Comments
 (0)