Update app.py

This commit is contained in:
Saifeddine ALOUI 2024-12-03 09:58:50 +01:00 committed by GitHub
parent 8cbbb988cd
commit 385b235acc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1137,7 +1137,7 @@ class LollmsApplication(LoLLMsCom):
"document_path":doc['path'],
"chunk_content":summary,
"chunk_size":0,
"distance":0,
"similarity":0,
})
if summary!="":
v.add_summaries(doc['path'],[{"context":query, "summary":summary}])
@ -1175,7 +1175,7 @@ class LollmsApplication(LoLLMsCom):
"document_path":chunk.doc.path,
"chunk_content":chunk.text,
"chunk_size":chunk.nb_tokens,
"distance":chunk.distance,
"similarity":1-chunk.distance,
})
documentation += document_infos
@ -1223,7 +1223,7 @@ class LollmsApplication(LoLLMsCom):
"document_path":doc['path'],
"chunk_content":summary,
"chunk_size":0,
"distance":0,
"similarity":0,
})
if summary!="":
v.add_summaries(doc['path'],[{"context":query, "summary":summary}])