From 49376813ae8d37d119bda2208ba6716720c5fc85 Mon Sep 17 00:00:00 2001 From: Inferencebot Date: Mon, 12 Oct 2026 19:26:06 -0600 Subject: [PATCH] rag_refresh: parse OWUI files-list {items:[...]} shape; unfiltered list + client-side name filter --- rag_refresh.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rag_refresh.py b/rag_refresh.py index 3c05c42..c937c4f 100644 --- a/rag_refresh.py +++ b/rag_refresh.py @@ -77,7 +77,9 @@ for name in DOCS: continue # delete stale file rows with this name, then upload fresh + attach - code, files = api(f"/api/v1/files/?name={name}") + code, files = api("/api/v1/files/?page=1") + if code == 200 and isinstance(files, dict): + files = files.get("items", []) # OWUI returns {items: [...]} if code == 200 and isinstance(files, list): for f in files: if f.get("filename") == name: