Spaces:
Running
Running
chore(sync): mirror backend .py + Dockerfile to Space (hf-sync-backend)
Browse filesAutomated backend sync from szl-holdings/a11oy main via hf-sync-backend.
Updated (differed from the Space): szl_rag.py
Deleted (gone from the repo + Dockerfile COPY set): (none)
Keeps the Space-built backend (serve.py + the Dockerfile-COPY'd .py
modules) identical to GitHub main so the Space never rebuilds from a
stale backend, new endpoints don't 404 there, and orphaned modules
removed from the repo don't linger in the Space tree.
- szl_rag.py +3 -3
szl_rag.py
CHANGED
|
@@ -278,8 +278,8 @@ def _ensure_loaded() -> None:
|
|
| 278 |
print(f"[szl_rag] READY — {len(corpus)} chunks, organs={list(indexes)}",
|
| 279 |
flush=True)
|
| 280 |
except Exception as exc: # honest degradation, never fake data
|
| 281 |
-
_state["error"] =
|
| 282 |
-
print(f"[szl_rag] NOT READY (honest stub mode): {
|
| 283 |
|
| 284 |
|
| 285 |
def _compute_model_weight_sha256() -> None:
|
|
@@ -556,7 +556,7 @@ def rag(query: str, space: str, top_k: int = 5, with_response: bool = False,
|
|
| 556 |
except Exception as exc:
|
| 557 |
answer_block = {
|
| 558 |
"answer": None,
|
| 559 |
-
"honest_error": f"LLM router unavailable: {type(exc).__name__}
|
| 560 |
"note": "Retrieval succeeded; generation tier not wired in this Space.",
|
| 561 |
}
|
| 562 |
out["with_response"] = True
|
|
|
|
| 278 |
print(f"[szl_rag] READY — {len(corpus)} chunks, organs={list(indexes)}",
|
| 279 |
flush=True)
|
| 280 |
except Exception as exc: # honest degradation, never fake data
|
| 281 |
+
_state["error"] = type(exc).__name__
|
| 282 |
+
print(f"[szl_rag] NOT READY (honest stub mode): {type(exc).__name__}: {exc}", flush=True)
|
| 283 |
|
| 284 |
|
| 285 |
def _compute_model_weight_sha256() -> None:
|
|
|
|
| 556 |
except Exception as exc:
|
| 557 |
answer_block = {
|
| 558 |
"answer": None,
|
| 559 |
+
"honest_error": f"LLM router unavailable: {type(exc).__name__}",
|
| 560 |
"note": "Retrieval succeeded; generation tier not wired in this Space.",
|
| 561 |
}
|
| 562 |
out["with_response"] = True
|