DeepVen commited on
Commit
5aef1e5
1 Parent(s): 1d73af1

Upload Index.py

Browse files
Files changed (1) hide show
  1. Index.py +6 -1
Index.py CHANGED
@@ -248,4 +248,9 @@ def rag(domain: str, question: str):
248
  # else:
249
  print("before doing Q&A")
250
  answer = _search(question, extractor)
251
- return {"question": question, "answer": answer}
 
 
 
 
 
 
248
  # else:
249
  print("before doing Q&A")
250
  answer = _search(question, extractor)
251
+
252
+ text = _prompt(question)
253
+ text += "\n" + " ".join(x["text"] for x in embeddings.search(question))
254
+ print("context \n")
255
+ print(text)
256
+ return {"question": question, "answer": answer, "context": text}