mirror of
https://github.com/zebrajr/ollama-webui.git
synced 2025-12-05 12:20:26 +01:00
15 lines
348 B
Python
15 lines
348 B
Python
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
|