Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -59,7 +59,7 @@ def get_file(source_documents):
|
|
59 |
def chat_query_doc(question, chat_history_doc):
|
60 |
|
61 |
query_old = f"""Provide an elaborate, precise and pointwise reply to the question: {question}.
|
62 |
-
Also, Please consider the provided chat history: {
|
63 |
Ensure that your current response is detailed, accurate, and addresses each aspect of the question thoroughly.
|
64 |
If the context of the question doesn't align with your last reply, please provide your response in a fresh manner.
|
65 |
If don't get the answer, feel free to reply from your own knowledge."""
|
@@ -84,7 +84,7 @@ def chat_query_doc(question, chat_history_doc):
|
|
84 |
qa = ConversationalRetrievalChain.from_llm(llm, retriever = retriever, return_source_documents = True)
|
85 |
|
86 |
# Replace input() with question variable for Gradio
|
87 |
-
result = qa({"question": query, "chat_history" :
|
88 |
|
89 |
# Update the history with the latest question and response
|
90 |
#history.append({"user": question, "bot": result["answer"]})
|
|
|
59 |
def chat_query_doc(question, chat_history_doc):
|
60 |
|
61 |
query_old = f"""Provide an elaborate, precise and pointwise reply to the question: {question}.
|
62 |
+
Also, Please consider the provided chat history: {chat_history_doc}.
|
63 |
Ensure that your current response is detailed, accurate, and addresses each aspect of the question thoroughly.
|
64 |
If the context of the question doesn't align with your last reply, please provide your response in a fresh manner.
|
65 |
If don't get the answer, feel free to reply from your own knowledge."""
|
|
|
84 |
qa = ConversationalRetrievalChain.from_llm(llm, retriever = retriever, return_source_documents = True)
|
85 |
|
86 |
# Replace input() with question variable for Gradio
|
87 |
+
result = qa({"question": query, "chat_history" : chat_history_doc})
|
88 |
|
89 |
# Update the history with the latest question and response
|
90 |
#history.append({"user": question, "bot": result["answer"]})
|