Repository navigation
Replies: 1 comment
|
This is a good idea, but I've converted it to a feature request rather than a bug |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Problem
There is currently no way to configure the package to exclude specific document type properties from being sent to the AI. Every property on a content item is sent, unfiltered, through two separate paths:
PropertyValueFormatter.ExtractProperties()(Umbraco.AI/src/Umbraco.AI.Core/Tools/Umbraco/PropertyValueFormatter.cs) iteratescontent.Propertieswith no filtering, feeding the agent's "read content" tool.document.adapter.ts(Umbraco.AI/src/Umbraco.AI.Web.StaticAssets/Client/src/entity-adapter/adapters/document.adapter.ts) serializes every property from the live editor form into a JSON payload sent to the server, which is then rendered into the prompt viaCmsEntityFormatHelper.FormatCmsEntity(EntityAdapter/Adapters/CmsEntityFormatHelper.cs).This has two distinct downsides:
The only existing related mechanism,
[AIField(IsSensitive = true)](EditableModels/AIEditableModelFieldAttribute.cs), only masks provider settings (e.g. API keys) — it does not apply to Umbraco content type properties.Suggested approach
Add an opt-out mechanism editors/developers can use to exclude a property (or property editor type) from being sent to AI, e.g.:
PropertyValueFormatter.ExtractProperties/FormatElementon the backend (agent tool reads)document.adapter.ts(and the analogousmedia.adapter.ts/block.adapter.ts) on the frontend, so the property is never even sent to the server, not just filtered server-sideExcludedPropertyEditorAliases) for excluding entire editor types (such as all "Label" or a custom "SEO metadata" editor) by defaultBoth the backend tool path and the frontend context-serialization path need to respect the same exclusion, since they are independent code paths today.
Why this matters
Without this:
All reactions