Update question.py
Browse files- question.py +1 -1
question.py
CHANGED
@@ -74,7 +74,7 @@ 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(), memory=memory, verbose=True, return_source_documents=True)
|
78 |
|
79 |
st.session_state['chat_history'].append(("You", question))
|
80 |
|
|
|
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 |
|