Interface BuildUIViaAICustomValidator


public interface BuildUIViaAICustomValidator
  • Method Details

    • execute

      void execute(BuildUIViaAIContext buildContext, Object validationContext, BuildUIViaAICustomValidationResultCallback callback)
      When CUSTOM is included among the BuildUIViaAIRequest.validationTypes, this is a callback that will be called to continue validating and/or correcting the response from the AI to the build-UI-via-AI request. This callback will not be called if the build-UI process fails before reaching custom validation.

      The BuildUIViaAIRequest.maxRetries limit is not applied during the running of the custom validator; any AI requests that the custom validator makes will not be affected by this setting of the build-UI-via-AI request.

      An implementation of this function must always call the provided callback with the working response, possibly modified according to the result of custom validation.

      Parameters:
      buildContext - Read-only context for the ongoing build-UI-via-AI operation.
      validationContext - The validationContext object supplied by a previous try of the validator.
      callback - The callback to call with the result of custom validation.