mirror of
https://github.com/ParisNeo/lollms.git
synced 2025-02-01 08:48:19 +00:00
added rag databases
This commit is contained in:
parent
bdebae5d71
commit
6a7346f930
@ -16,6 +16,7 @@ class Client:
|
||||
self.db_name = db
|
||||
self.rooms = set()
|
||||
|
||||
self.rag_databases = []
|
||||
self.generated_text = ""
|
||||
self.cancel_generation = False
|
||||
self.generation_thread:Thread = None
|
||||
|
@ -148,6 +148,7 @@ def select_rag_database() -> Optional[Dict[str, Path]]:
|
||||
print(f"Added document: {title}")
|
||||
except Exception as e:
|
||||
print(f"Failed to add document {fn}: {e}")
|
||||
lollmsElfServer.HideBlockingMessage()
|
||||
return {"database_name": db_name, "database_path": Path(folder_path)}
|
||||
except:
|
||||
lollmsElfServer.HideBlockingMessage()
|
||||
@ -207,5 +208,7 @@ def mount_rag_database(database_infos: MountDatabase):
|
||||
"""
|
||||
Selects and names a database
|
||||
"""
|
||||
check_access(lollmsElfServer, database_infos.client_id)
|
||||
client = check_access(lollmsElfServer, database_infos.client_id)
|
||||
client.rag_databases.append(database_infos.database_name)
|
||||
return select_rag_database()
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user