From a1690843ec1a24cc60cf19d09e5f7fba597a0af7 Mon Sep 17 00:00:00 2001 From: Saifeddine ALOUI Date: Wed, 10 Jul 2024 02:18:00 +0200 Subject: [PATCH] enhanced ui --- lollms_core | 2 +- lollms_webui.py | 75 +++++++++++++++++++++++++++++++++++++------------ 2 files changed, 58 insertions(+), 19 deletions(-) diff --git a/lollms_core b/lollms_core index 488229b9..223fbefb 160000 --- a/lollms_core +++ b/lollms_core @@ -1 +1 @@ -Subproject commit 488229b9128126f5f5d99d4ac301eec214fb0ff9 +Subproject commit 223fbefb9cfaf683067e8f80bd9f2344bf504c35 diff --git a/lollms_webui.py b/lollms_webui.py index 0aa4a5ee..e05a7898 100644 --- a/lollms_webui.py +++ b/lollms_webui.py @@ -1320,36 +1320,75 @@ class LOLLMSWebUI(LOLLMSElfServer):
''' sources_text += '' self.personality.ui(sources_text) - + if len(context_details["skills"]) > 0: + sources_text += '
Memories:
' + sources_text += '
' + ind = 0 + for skill in context_details["skills"]: + sources_text += f''' +
+ + +
+ ''' + ind += 1 + sources_text += '
' + self.personality.ui(sources_text) # Send final message if self.config.activate_internet_search or force_using_internet or generation_type == "full_context_with_internet": from lollms.internet import get_favicon_url, get_root_url - sources_text += '
' - sources_text += '
Sources:
' + sources_text += ''' +
+
Sources:
+
+ ''' + for source in internet_search_infos: url = source["url"] title = source["title"] brief = source["brief"] - favicon_url = get_favicon_url(url) - if favicon_url is None: - favicon_url ="/personalities/internet/loi/assets/logo.png" - root_url = get_root_url(url) - sources_text += "\n".join([ - f'', - f' ', - f'
{root_url}
', - f'
', - ]) - sources_text += '
' + favicon_url = get_favicon_url(url) or "/personalities/generic/lollms/assets/logo.png" + root_url = get_root_url(url) + + sources_text += f''' + + {title} +
{root_url}
+
+ ''' + + sources_text += ''' +
+
+ ''' + + # Add CSS for animations + sources_text += ''' + + ''' self.personality.ui(sources_text) except Exception as ex: trace_exception(ex)