Update lollms_discussion_events.py

This commit is contained in:
Saifeddine ALOUI 2024-05-05 23:38:38 +02:00 committed by GitHub
parent bf3f62637e
commit 86016e48da
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -65,7 +65,11 @@ def add_events(sio:socketio):
pygame.mixer.music.play()
except Exception as ex:
pass
default_language = lollmsElfServer.personality.language.lower().strip().split()[0]
if lollmsElfServer.personality.language:
default_language = lollmsElfServer.personality.language.lower().strip().split()[0]
else:
default_language = 'english'
current_language = lollmsElfServer.config.current_language.lower().strip().split()[0]
if lollmsElfServer.config.current_language and current_language!= default_language:
@ -136,4 +140,4 @@ def add_events(sio:socketio):
jsons,
to=client_id
)
ASCIIColors.green(f"ok")
ASCIIColors.green(f"ok")