From 385b235acc2440ebe843001eeba167a441ec5d7c Mon Sep 17 00:00:00 2001 From: Saifeddine ALOUI Date: Tue, 3 Dec 2024 09:58:50 +0100 Subject: [PATCH] Update app.py --- lollms/app.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lollms/app.py b/lollms/app.py index 283f0fb..994c594 100644 --- a/lollms/app.py +++ b/lollms/app.py @@ -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}])