Spaces:
Running
on
T4
Running
on
T4
Update app.py
Browse files
app.py
CHANGED
|
@@ -59,10 +59,9 @@ 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="similarity_score_threshold", search_kwargs={"score_threshold": 0.
|
| 63 |
|
| 64 |
context_retrieved = retriever.invoke(question)
|
| 65 |
-
print("retrieved results:",context_retrieved_lst)
|
| 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.6, "k": 3})
|
| 63 |
|
| 64 |
context_retrieved = retriever.invoke(question)
|
|
|
|
| 65 |
|
| 66 |
def format_docs(docs):
|
| 67 |
return "\n\n".join(doc.page_content for doc in docs)
|