Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -80,18 +80,13 @@ history_aware_retriever = create_history_aware_retriever(
|
|
| 80 |
qa_system_prompt = """You are an assistant for question-answering tasks.
|
| 81 |
Use the following pieces of retrieved context to answer the question.
|
| 82 |
If you don't know the answer, just say that you don't know.
|
| 83 |
-
Use three sentences maximum and keep the answer concise.
|
| 84 |
-
Now, you will be given a question and you will need to answer it.
|
| 85 |
-
|
| 86 |
-
{context}
|
| 87 |
-
|
| 88 |
-
Assistant:
|
| 89 |
"""
|
| 90 |
qa_prompt = ChatPromptTemplate.from_messages(
|
| 91 |
[
|
| 92 |
("system", qa_system_prompt),
|
| 93 |
MessagesPlaceholder("chat_history"),
|
| 94 |
-
("user", "{input}"),
|
| 95 |
]
|
| 96 |
)
|
| 97 |
question_answer_chain = create_stuff_documents_chain(llm, qa_prompt)
|
|
|
|
| 80 |
qa_system_prompt = """You are an assistant for question-answering tasks.
|
| 81 |
Use the following pieces of retrieved context to answer the question.
|
| 82 |
If you don't know the answer, just say that you don't know.
|
| 83 |
+
Use three sentences maximum and keep the answer concise.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 84 |
"""
|
| 85 |
qa_prompt = ChatPromptTemplate.from_messages(
|
| 86 |
[
|
| 87 |
("system", qa_system_prompt),
|
| 88 |
MessagesPlaceholder("chat_history"),
|
| 89 |
+
("user", "{input} Assistant: "),
|
| 90 |
]
|
| 91 |
)
|
| 92 |
question_answer_chain = create_stuff_documents_chain(llm, qa_prompt)
|