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