fixed null problems

This commit is contained in:
Saifeddine ALOUI 2023-11-15 22:12:12 +01:00
parent 550c143bfd
commit 6f8db4307f
7 changed files with 8 additions and 6 deletions

View File

@ -1546,6 +1546,8 @@ class LoLLMsAPPI(LollmsApplication):
"""
Processes a chunk of generated text
"""
if chunk is None:
return True
if not client_id in list(self.connections.keys()):
self.notify("Connection lost",False, client_id)
return

View File

@ -614,7 +614,7 @@ class Discussion:
)
self.messages.append(self.current_message)
self.current_message.update(content, metadata, ui)
return self.current_message
def rename(self, new_title):

2
app.py
View File

@ -1670,7 +1670,7 @@ try:
def get_current_personality_files_list(self):
if self.personality is None:
return jsonify({"state":False, "error":"No personality selected"})
return jsonify({"state":True, "files":[{"name":Path(f).name, "size":Path(f).stat().st_size} for f in self.personality.text_files]})
return jsonify({"state":True, "files":[{"name":Path(f).name, "size":Path(f).stat().st_size} for f in self.personality.text_files]+[{"name":Path(f).name, "size":Path(f).stat().st_size} for f in self.personality.image_files]})
def clear_personality_files_list(self):
if self.personality is None:

@ -1 +1 @@
Subproject commit 1908ee3532735f98651386713e0429f22be86b7a
Subproject commit 0f6f441ef6d493f545a2e73a086b8e7ca466fdb0

@ -1 +1 @@
Subproject commit 7b6be7c677d6d373810971fb830f83437899c76c
Subproject commit 9e60ea31c5e553d60324e493c2246942115f9b43

@ -1 +1 @@
Subproject commit 8fcbc19951a55be30c77d77ef049fd575c7517ea
Subproject commit cc21ecce0c58647776d2ad03a5148cc6c0350b50

@ -1 +1 @@
Subproject commit 53d25974ad9a2afc41fc3684cfea98d6461d637e
Subproject commit ceaf09850782fb4fb347c62ec9338de50e3a17d5