Shubham170793 commited on
Commit
59b2329
·
verified ·
1 Parent(s): 1760b27

Update src/qa.py

Browse files
Files changed (1) hide show
  1. src/qa.py +1 -1
src/qa.py CHANGED
@@ -295,7 +295,7 @@ def generate_answer(query: str, retrieved_chunks: list, reasoning_mode: bool = F
295
  return "⚠️ GPT-4o not initialized. Check credentials or rebuild the Space."
296
 
297
  # Build and clean context
298
- context = "\n".join(f"[Chunk {i+1}] {chunk.strip()}" for i, chunk in enumerate(retrieved_chunks))
299
  context = "\n".join(dict.fromkeys(context.splitlines()))
300
  context = truncate_context(context, 100000)
301
 
 
295
  return "⚠️ GPT-4o not initialized. Check credentials or rebuild the Space."
296
 
297
  # Build and clean context
298
+ context = "\n".join(chunk.strip() for chunk in retrieved_chunks)
299
  context = "\n".join(dict.fromkeys(context.splitlines()))
300
  context = truncate_context(context, 100000)
301