refac: metadata handling in vectordb

This commit is contained in:
Timothy Jaeryang Baek
2025-07-31 17:45:06 +04:00
parent aa83ebae58
commit 6a17ba5b7a
5 changed files with 31 additions and 24 deletions

View File

@@ -0,0 +1,14 @@
from datetime import datetime
def stringify_metadata(
metadata: dict[str, any],
) -> dict[str, any]:
for key, value in metadata.items():
if (
isinstance(value, datetime)
or isinstance(value, list)
or isinstance(value, dict)
):
metadata[key] = str(value)
return metadata