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
commit 4ba1292455
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
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))