ppsingh commited on
Commit
849b323
1 Parent(s): a5105d9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
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": 3, "filter":filter})
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,