Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Update app.py
Browse files
app.py
CHANGED
@@ -59,10 +59,10 @@ async def chat(query,history,sources,reports):
|
|
59 |
question_lst= [query]
|
60 |
for question in question_lst:
|
61 |
retriever = vectorstore.as_retriever(
|
62 |
-
search_type="
|
63 |
-
search_kwargs={"k": 1})
|
64 |
|
65 |
-
context_retrieved = retriever.
|
|
|
66 |
|
67 |
def format_docs(docs):
|
68 |
return "\n\n".join(doc.page_content for doc in docs)
|
|
|
59 |
question_lst= [query]
|
60 |
for question in question_lst:
|
61 |
retriever = vectorstore.as_retriever(
|
62 |
+
search_type="similarity_score_threshold", search_kwargs={"score_threshold": 0.5, "k": 5})
|
|
|
63 |
|
64 |
+
context_retrieved = retriever.invoke(question)
|
65 |
+
print(context_retrieved_lst)
|
66 |
|
67 |
def format_docs(docs):
|
68 |
return "\n\n".join(doc.page_content for doc in docs)
|