Fixes 03
This commit is contained in:
parent
a8f128c18f
commit
5b0f1fc48c
1 changed files with 2 additions and 2 deletions
|
|
@ -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}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue