Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Update app.py
Browse files
app.py
CHANGED
@@ -165,7 +165,7 @@ async def chat(query,history,sources,reports,subtype,year):
|
|
165 |
question_lst= [query]
|
166 |
for question in question_lst:
|
167 |
retriever = vectorstore.as_retriever(
|
168 |
-
search_type="similarity_score_threshold", search_kwargs={"score_threshold": 0.6, "k":
|
169 |
|
170 |
context_retrieved = retriever.invoke(question)
|
171 |
print(len(context_retrieved))
|
@@ -250,7 +250,8 @@ async def chat(query,history,sources,reports,subtype,year):
|
|
250 |
"year":year,
|
251 |
"question":query,
|
252 |
"sources":sources,
|
253 |
-
"retriever":
|
|
|
254 |
"docs":[doc.page_content for doc in context_retrieved],
|
255 |
"answer": history[-1][1],
|
256 |
"time": timestamp,
|
|
|
165 |
question_lst= [query]
|
166 |
for question in question_lst:
|
167 |
retriever = vectorstore.as_retriever(
|
168 |
+
search_type="similarity_score_threshold", search_kwargs={"score_threshold": 0.6, "k": int(config.get('retriever','TOP_KEY')), "filter":filter})
|
169 |
|
170 |
context_retrieved = retriever.invoke(question)
|
171 |
print(len(context_retrieved))
|
|
|
250 |
"year":year,
|
251 |
"question":query,
|
252 |
"sources":sources,
|
253 |
+
"retriever":model_config.get('retriever','MODEL'),
|
254 |
+
"raeder":model_config.get('reader','MODEL'),
|
255 |
"docs":[doc.page_content for doc in context_retrieved],
|
256 |
"answer": history[-1][1],
|
257 |
"time": timestamp,
|