diff --git a/modules/workflows/processing/adaptive/contentValidator.py b/modules/workflows/processing/adaptive/contentValidator.py index ad9f6e7f..740067b7 100644 --- a/modules/workflows/processing/adaptive/contentValidator.py +++ b/modules/workflows/processing/adaptive/contentValidator.py @@ -80,7 +80,7 @@ class ContentValidator: overall_success = False return { - "overallSuccess": overall_success.group(1).lower() == 'true' if overall_success else False, + "overallSuccess": overall_success if isinstance(overall_success, bool) else (overall_success.group(1).lower() == 'true' if overall_success else False), "qualityScore": float(quality_score.group(1)) if quality_score else 0.5, "validationDetails": [{ "documentName": "AI Validation (Fallback)", @@ -163,7 +163,7 @@ IMPORTANT: Even if the content is binary files (like .docx, .pdf, etc.), you mus # If first attempt fails, try with more explicit prompt if response and not self._isValidJsonResponse(response): - logger.warning("First AI validation attempt failed, retrying with explicit JSON-only prompt") + logger.debug("First AI validation attempt failed, retrying with explicit JSON-only prompt") explicitPrompt = f""" {validationPrompt}