lightrag integration

This commit is contained in:
Saifeddine ALOUI 2024-12-21 01:58:14 +01:00
parent 3d597fc419
commit a2a7a78be5

View File

@ -1194,7 +1194,8 @@ class LollmsApplication(LoLLMsCom):
if (len(self.config.remote_databases) > 0) and not self.config.rag_deactivate:
for db in self.config.remote_databases:
parts = db.split("::")
if len(parts)>=4:
if len(parts)>=4 and parts[-1]=="mounted":
try:
if parts[1]=="lightrag":
from lollmsvectordb.database_clients.lightrag_client import LollmsLightRagConnector
lc = LollmsLightRagConnector(parts[2])
@ -1218,6 +1219,8 @@ class LollmsApplication(LoLLMsCom):
else:
query = current_message.content
documentation += lc.query(query)
except Exception as ex:
trace_exception(ex)
if (len(client.discussion.text_files) > 0) and client.discussion.vectorizer is not None:
if not self.config.rag_deactivate: