Spaces:
Sleeping
Sleeping
Update src/rag_engine.py
Browse files- src/rag_engine.py +2 -1
src/rag_engine.py
CHANGED
|
@@ -265,8 +265,9 @@ def list_documents(username: str) -> List[dict]:
|
|
| 265 |
}
|
| 266 |
inventory[src]["chunks"] += 1
|
| 267 |
|
|
|
|
| 268 |
return [
|
| 269 |
-
{"filename": k, "chunks": v["chunks"], "strategy": v["strategy"]}
|
| 270 |
for k, v in inventory.items()
|
| 271 |
]
|
| 272 |
except Exception as e:
|
|
|
|
| 265 |
}
|
| 266 |
inventory[src]["chunks"] += 1
|
| 267 |
|
| 268 |
+
# FIXED: Added "source": k to the dictionary below
|
| 269 |
return [
|
| 270 |
+
{"filename": k, "chunks": v["chunks"], "strategy": v["strategy"], "source": k}
|
| 271 |
for k, v in inventory.items()
|
| 272 |
]
|
| 273 |
except Exception as e:
|