Update rag.py

This commit is contained in:
Stéphan Peccini 2025-05-19 08:20:34 +02:00
parent f12bee11b7
commit 32591990fe

2
rag.py
View File

@ -61,7 +61,7 @@ DOCS: dict[int,str] = {}
for base_offset, meta in zip(start_offset, metas):
for i, m in enumerate(meta):
rel_path = m.get("path") or m.get("file")
full_path = f"{ROOT}/{rel_path}"
full_path = ROOT / rel_path
DOCS[base_offset + i] = full_path.read_text(encoding="utf-8")
print("[dim]Cache texte préchargé.[/]")