Spaces:
Runtime error
Runtime error
Commit
·
22d6d1d
1
Parent(s):
348e071
undo changes
Browse files- qa_engine/qa_engine.py +0 -12
qa_engine/qa_engine.py
CHANGED
|
@@ -304,18 +304,6 @@ class QAEngine():
|
|
| 304 |
|
| 305 |
logger.info('Running LLM chain')
|
| 306 |
question_processed = QAEngine._preprocess_question(question)
|
| 307 |
-
question_processed = self.llm_model(
|
| 308 |
-
f"""
|
| 309 |
-
<|im_start|>system
|
| 310 |
-
Given a user's query that is vague or broad, your task is to refine and rephrase the query to make it more specific and targeted, ultimately returning only the refined question. <|im_end|>
|
| 311 |
-
<|im_end|>
|
| 312 |
-
<|im_start|>user
|
| 313 |
-
<question>{question_processed}</question>
|
| 314 |
-
<|im_end|>
|
| 315 |
-
<|im_start|>assistant
|
| 316 |
-
"""
|
| 317 |
-
)
|
| 318 |
-
|
| 319 |
answer = self.llm_chain.run(question=question_processed, context=context)
|
| 320 |
answer_postprocessed = QAEngine._postprocess_answer(answer)
|
| 321 |
response.set_answer(answer_postprocessed)
|
|
|
|
| 304 |
|
| 305 |
logger.info('Running LLM chain')
|
| 306 |
question_processed = QAEngine._preprocess_question(question)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 307 |
answer = self.llm_chain.run(question=question_processed, context=context)
|
| 308 |
answer_postprocessed = QAEngine._postprocess_answer(answer)
|
| 309 |
response.set_answer(answer_postprocessed)
|