rag_perso / src /vectorstore /metadata_store.py
ALBERT Clement
Initial RAG
c4bf3b5
Raw
History Blame Contribute Delete
404 Bytes
import json
def save_metadata(metadata, metadata_path):
with open(metadata_path, "w", encoding="utf-8") as f:
json.dump(metadata, f, ensure_ascii=False, indent=4)
print("Métadonnées sauvegardées.")
def load_metadata(metadata_path):
with open(metadata_path, "r", encoding="utf-8") as f:
metadata = json.load(f)
print("Métadonnées chargées.")
return metadata