Home > @uniformdev/mesh-edgehancer-sdk > AfterAIEditHookFn

AfterAIEditHookFn type

Shape of a hook function that is invoked after an AI edit has been performed to a custom property type. The function can alter the success or value of the edit performed by the LLM.

NOTE: this function is only invoked when a value is edited. If the value is cleared or overrides reset, the function is not invoked (those are internally handled)

NOTE: in most cases, you want createAIEdit well before this hook. This hook allows catching hallucinations, applying deterministic business rules, or transforming the format of the AI result into another format.

Signature:

References: AfterAIEditContext, AfterAIEditResult