betterwithage commited on
Commit
098c9e4
·
verified ·
1 Parent(s): 3e83860

chore(sync): mirror backend .py + Dockerfile to Space (hf-sync-backend)

Browse files

Automated 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.

Files changed (1) hide show
  1. 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"] = f"{type(exc).__name__}: {exc}"
282
- print(f"[szl_rag] NOT READY (honest stub mode): {_state['error']}", flush=True)
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__}: {exc}",
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