Update question.py
Browse files- question.py +2 -2
question.py
CHANGED
@@ -74,8 +74,8 @@ def chat_with_doc(model, vector_store: SupabaseVectorStore, stats_db):
|
|
74 |
huggingfacehub_api_token=hf_api_key,
|
75 |
model_kwargs=model_kwargs
|
76 |
)
|
77 |
-
qa = ConversationalRetrievalChain.from_llm(hf, retriever=vector_store.as_retriever(search_kwargs={"score_threshold": 0.6, "k": 4,"filter": {"user": st.session_state["username"]}})
|
78 |
-
|
79 |
st.session_state['chat_history'].append(("You", question))
|
80 |
|
81 |
# Generate model's response and add it to chat history
|
|
|
74 |
huggingfacehub_api_token=hf_api_key,
|
75 |
model_kwargs=model_kwargs
|
76 |
)
|
77 |
+
qa = ConversationalRetrievalChain.from_llm(hf, retriever=vector_store.as_retriever(search_kwargs={"score_threshold": 0.6, "k": 4,"filter": {"user": st.session_state["username"]}}), memory=memory, verbose=True, return_source_documents=True)
|
78 |
+
|
79 |
st.session_state['chat_history'].append(("You", question))
|
80 |
|
81 |
# Generate model's response and add it to chat history
|