Spaces:
Running
Running
Update main.py
Browse files
main.py
CHANGED
@@ -58,7 +58,7 @@ def response_generator(query):
|
|
58 |
huggingfacehub_api_token=hf_api_key,
|
59 |
model_kwargs=model_kwargs
|
60 |
)
|
61 |
-
qa = ConversationalRetrievalChain.from_llm(hf, retriever=vector_store.as_retriever(search_kwargs={"score_threshold": 0.6, "k":
|
62 |
|
63 |
# Generate model's response
|
64 |
model_response = qa({"question": query})
|
|
|
58 |
huggingfacehub_api_token=hf_api_key,
|
59 |
model_kwargs=model_kwargs
|
60 |
)
|
61 |
+
qa = ConversationalRetrievalChain.from_llm(hf, retriever=vector_store.as_retriever(search_kwargs={"score_threshold": 0.6, "k": 4,"filter": {"user": username}}), memory=memory, verbose=True, return_source_documents=True)
|
62 |
|
63 |
# Generate model's response
|
64 |
model_response = qa({"question": query})
|