refactor: replace print statements with proper logging (#25773)

This commit is contained in:
-LAN-
2025-09-18 20:35:47 +08:00
committed by GitHub
parent bb01c31f30
commit 4ba1292455
8 changed files with 30 additions and 12 deletions

View File

@@ -229,7 +229,7 @@ class OceanBaseVector(BaseVector):
try:
metadata = json.loads(metadata_str)
except json.JSONDecodeError:
print(f"Invalid JSON metadata: {metadata_str}")
logger.warning("Invalid JSON metadata: %s", metadata_str)
metadata = {}
metadata["score"] = score
docs.append(Document(page_content=_text, metadata=metadata))