Karmabunny / sprout3

SproutCMS: content management and framework
http://getsproutcms.com
GNU General Public License v2.0
24 stars 3 forks source link

Feat/ai reprocess #103

Closed jamiemonksuk closed 7 months ago

jamiemonksuk commented 7 months ago

This provides extendable admin tooling to create AI generated content for existing records.

It's hooked in to the admin controller as per import and export. The data query uses the export query by default but can be extended for custom joins and such on a module basis. The column headings for both export and AI tools are now built from the results, not just the base table, which was a long standing issue.

AI prompts no longer need to be present in the original data, they can be built on the fly, and any field present in the data query can be injected into the prompt using {{ twig_style_templating }}

The query for getting export previews has been split out so we can use common component for AI preview interfaces too.

The AI post import method has been refined to build its data set internally, which is much cleaner for the calling code. In most cases now you can just pass the multiedit from the admin form straight in.

Once processed into the AI queue, a worker job is fired as per the import tooling.

image