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/07-Plugins/17-bulk-ai-flow.md
+50Lines changed: 50 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -332,3 +332,53 @@ If you want to compare a generated image with an image stored in your storage, y
332
332
After generation, you’ll see a button labeled "old image". Clicking it will open a pop-up where you can compare the generated image with the stored one:
333
333
334
334

335
+
336
+
## Extra data fields
337
+
338
+
When creating default prompts, you can use Handlebars to pass data from the record into the prompt:
339
+
340
+
```ts
341
+
...
342
+
fillPlainFields: {
343
+
description: 'Create a description based on the apartment name: {{title}}.'
344
+
},
345
+
...
346
+
```
347
+
348
+
Each record will receive a unique prompt based on its own title.
349
+
350
+
If you want to add extra data fields for use in your prompt, implement the `provideAdditionalContextForRecord` callback:
description: 'Create a description based on the apartment name: {{title}}. Also include the fact that the apartment has a discount of {{extraData.discount}}.'
365
+
},
366
+
```
367
+
368
+
## Allow users to edit generation prompts
369
+
370
+
If you want to let users adjust generation prompts for their unique cases, add this to the plugin setup:
371
+
372
+
```ts
373
+
...
374
+
//diff-add
375
+
askConfirmationBeforeGenerating:true,
376
+
...
377
+
```
378
+
379
+
The user will now see a popup with a "Start generation" button and an "Edit prompts" button, allowing them to modify the prompt before running it.
380
+
381
+

382
+

383
+
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.
0 commit comments