Spaces:
Sleeping
Sleeping
Update services/qa_service/qna.py
Browse files
services/qa_service/qna.py
CHANGED
@@ -32,12 +32,12 @@ class QAService:
|
|
32 |
|
33 |
result = self.pc_index.query(
|
34 |
vector=embedded_query,
|
35 |
-
top_k=
|
36 |
include_values=False,
|
37 |
include_metadata=True
|
38 |
)
|
39 |
|
40 |
-
output = self.parse_results(result)
|
41 |
|
42 |
return output
|
43 |
|
@@ -47,4 +47,4 @@ class QAService:
|
|
47 |
prompt = format_prompt(self.question, context)
|
48 |
output = self.model_pipeline.infer(prompt)
|
49 |
|
50 |
-
return output,
|
|
|
32 |
|
33 |
result = self.pc_index.query(
|
34 |
vector=embedded_query,
|
35 |
+
top_k=5,
|
36 |
include_values=False,
|
37 |
include_metadata=True
|
38 |
)
|
39 |
|
40 |
+
output = self.parse_results(result)["text"]
|
41 |
|
42 |
return output
|
43 |
|
|
|
47 |
prompt = format_prompt(self.question, context)
|
48 |
output = self.model_pipeline.infer(prompt)
|
49 |
|
50 |
+
return output, context
|