Add Go service/handler tests for API contract parity (#16905)

This commit is contained in:
euvre
2026-07-20 20:02:41 +08:00
committed by GitHub
parent 2f7c2eb53c
commit f45f03a016
46 changed files with 1553 additions and 214 deletions

View File

@@ -467,10 +467,7 @@ class DoclingParser(RAGFlowPdfParser):
if chunk_flag and response_is_chunk:
self.logger.info(f"[Docling] Successfully used native chunking on: {endpoint}")
elif chunk_flag:
self.logger.warning(
f"[Docling] Server ignored chunking request on {endpoint}; "
"treating response as standard conversion."
)
self.logger.warning(f"[Docling] Server ignored chunking request on {endpoint}; treating response as standard conversion.")
else:
self.logger.info(f"[Docling] Chunking unavailable, fell back to standard: {endpoint}")
break

View File

@@ -212,7 +212,7 @@ class RAGFlowPdfParser:
logging.warning("Could not load OCR alphabet from %s: %s; treating all text as representable.", res, e)
cls._OCR_ALPHABET = set()
if not cls._OCR_ALPHABET:
return True # unknown alphabet: preserve existing behaviour
return True # unknown alphabet: preserve existing behaviour
letters = [c for c in text if c.strip()]
if not letters:
return True