tykiww commited on
Commit
a91dc62
·
verified ·
1 Parent(s): 5794520

Update services/qa_service/qna.py

Browse files
Files changed (1) hide show
  1. services/qa_service/qna.py +3 -3
services/qa_service/qna.py CHANGED
@@ -51,10 +51,10 @@ class QAService:
51
  def run(self):
52
  """Query pinecone outputs and infer results"""
53
  full_context = self.retrieve_context()
54
- print(full_context)
55
- context = [i["text"] for i in full_context]
56
 
 
 
57
  prompt = format_prompt(self.question, context)
58
  output = self.model_pipeline.infer(prompt)
59
 
60
- return self.question, full_context, # output, context
 
51
  def run(self):
52
  """Query pinecone outputs and infer results"""
53
  full_context = self.retrieve_context()
 
 
54
 
55
+ context = '\n'.join([i["text"] for i in full_context])
56
+
57
  prompt = format_prompt(self.question, context)
58
  output = self.model_pipeline.infer(prompt)
59
 
60
+ return output, context