tharunchndrn commited on
Commit
0817de4
·
verified ·
1 Parent(s): c4463ee

Update backend_app/rag_hf.py

Browse files
Files changed (1) hide show
  1. backend_app/rag_hf.py +4 -6
backend_app/rag_hf.py CHANGED
@@ -87,12 +87,10 @@ class RAGEngineHF:
87
 
88
  if self._needs_web_fallback(local):
89
  web_ctx, web_src = self.fetch_web_context(query)
90
- if web_ctx:
91
- used = "web"
92
- contexts = web_ctx
93
- sources = web_src
94
- else:
95
- used = "local"
96
 
97
  context_block = "\n\n".join(
98
  [f"[{i+1}] {c['meta']['title']}\n{c['text'][:self.MAX_CONTEXT_CHARS_PER_DOC]}"
 
87
 
88
  if self._needs_web_fallback(local):
89
  web_ctx, web_src = self.fetch_web_context(query)
90
+ if web_ctx:
91
+ used = "web"
92
+ contexts = web_ctx
93
+ sources = web_src
 
 
94
 
95
  context_block = "\n\n".join(
96
  [f"[{i+1}] {c['meta']['title']}\n{c['text'][:self.MAX_CONTEXT_CHARS_PER_DOC]}"