mirror of
https://github.com/ParisNeo/lollms-webui.git
synced 2024-12-24 06:36:37 +00:00
upgraded to new lollms
This commit is contained in:
parent
01b0ce0119
commit
540800cf04
@ -115,7 +115,7 @@ def parse_requirements_file(requirements_path):
|
|||||||
class LoLLMsAPPI(LollmsApplication):
|
class LoLLMsAPPI(LollmsApplication):
|
||||||
def __init__(self, config:LOLLMSConfig, socketio, config_file_path:str, lollms_paths: LollmsPaths) -> None:
|
def __init__(self, config:LOLLMSConfig, socketio, config_file_path:str, lollms_paths: LollmsPaths) -> None:
|
||||||
|
|
||||||
super().__init__("Lollms_webui",config, lollms_paths, callback=self.process_chunk)
|
super().__init__("Lollms_webui",config, lollms_paths, callback=self.process_chunk, notification_callback=self.notify)
|
||||||
|
|
||||||
|
|
||||||
self.busy = False
|
self.busy = False
|
||||||
@ -1405,7 +1405,7 @@ class LoLLMsAPPI(LollmsApplication):
|
|||||||
# ASCIIColors.hilight(discussion_messages,"!@>",ASCIIColors.color_yellow,ASCIIColors.color_bright_red,False)
|
# ASCIIColors.hilight(discussion_messages,"!@>",ASCIIColors.color_yellow,ASCIIColors.color_bright_red,False)
|
||||||
ASCIIColors.yellow(discussion_messages)
|
ASCIIColors.yellow(discussion_messages)
|
||||||
ASCIIColors.bold("Final prompt")
|
ASCIIColors.bold("Final prompt")
|
||||||
# ASCIIColors.hilight(prompt_data,"!@>",ASCIIColors.color_yellow,ASCIIColors.color_bright_red,False)
|
#ASCIIColors.hilight(prompt_data,"!@>",ASCIIColors.color_yellow,ASCIIColors.color_bright_red,False)
|
||||||
ASCIIColors.yellow(prompt_data)
|
ASCIIColors.yellow(prompt_data)
|
||||||
ASCIIColors.info(f"prompt size:{len(tokens)} tokens")
|
ASCIIColors.info(f"prompt size:{len(tokens)} tokens")
|
||||||
ASCIIColors.info(f"available space after doc and history:{available_space} tokens")
|
ASCIIColors.info(f"available space after doc and history:{available_space} tokens")
|
||||||
|
12
app.py
12
app.py
@ -909,7 +909,7 @@ class LoLLMsWebUI(LoLLMsAPPI):
|
|||||||
self.config.personalities= ["generic/lollms"]
|
self.config.personalities= ["generic/lollms"]
|
||||||
self.mount_personality(0)
|
self.mount_personality(0)
|
||||||
gc.collect()
|
gc.collect()
|
||||||
self.binding = BindingBuilder().build_binding(self.config, self.lollms_paths)
|
self.binding = BindingBuilder().build_binding(self.config, self.lollms_paths, self.notify)
|
||||||
|
|
||||||
self.model = self.binding.build_model()
|
self.model = self.binding.build_model()
|
||||||
for per in self.mounted_personalities:
|
for per in self.mounted_personalities:
|
||||||
@ -940,7 +940,7 @@ class LoLLMsWebUI(LoLLMsAPPI):
|
|||||||
for per in self.mounted_personalities:
|
for per in self.mounted_personalities:
|
||||||
per.model = None
|
per.model = None
|
||||||
gc.collect()
|
gc.collect()
|
||||||
self.binding = BindingBuilder().build_binding(self.config, self.lollms_paths)
|
self.binding = BindingBuilder().build_binding(self.config, self.lollms_paths, self.notify)
|
||||||
self.model = None
|
self.model = None
|
||||||
self.config.save_config()
|
self.config.save_config()
|
||||||
ASCIIColors.green("Model loaded successfully")
|
ASCIIColors.green("Model loaded successfully")
|
||||||
@ -1569,10 +1569,10 @@ class LoLLMsWebUI(LoLLMsAPPI):
|
|||||||
ASCIIColors.info("Reinstalling binding")
|
ASCIIColors.info("Reinstalling binding")
|
||||||
old_bn = self.config.binding_name
|
old_bn = self.config.binding_name
|
||||||
self.config.binding_name = data['name']
|
self.config.binding_name = data['name']
|
||||||
self.binding = BindingBuilder().build_binding(self.config, self.lollms_paths, InstallOption.FORCE_INSTALL)
|
self.binding = BindingBuilder().build_binding(self.config, self.lollms_paths, InstallOption.FORCE_INSTALL, self.notify)
|
||||||
ASCIIColors.success("Binding reinstalled successfully")
|
ASCIIColors.success("Binding reinstalled successfully")
|
||||||
self.config.binding_name = old_bn
|
self.config.binding_name = old_bn
|
||||||
self.binding = BindingBuilder().build_binding(self.config, self.lollms_paths)
|
self.binding = BindingBuilder().build_binding(self.config, self.lollms_paths, self.notify)
|
||||||
self.model = self.binding.build_model()
|
self.model = self.binding.build_model()
|
||||||
for per in self.mounted_personalities:
|
for per in self.mounted_personalities:
|
||||||
per.model = self.model
|
per.model = self.model
|
||||||
@ -1598,7 +1598,7 @@ class LoLLMsWebUI(LoLLMsAPPI):
|
|||||||
per.model = None
|
per.model = None
|
||||||
gc.collect()
|
gc.collect()
|
||||||
ASCIIColors.info("UnInstalling binding")
|
ASCIIColors.info("UnInstalling binding")
|
||||||
self.binding = BindingBuilder().build_binding(self.config, self.lollms_paths, InstallOption.FORCE_INSTALL)
|
self.binding = BindingBuilder().build_binding(self.config, self.lollms_paths, InstallOption.FORCE_INSTALL, self.notify)
|
||||||
self.binding.uninstall()
|
self.binding.uninstall()
|
||||||
ASCIIColors.success("Binding UnInstalled successfully")
|
ASCIIColors.success("Binding UnInstalled successfully")
|
||||||
self.config.binding_name= None
|
self.config.binding_name= None
|
||||||
@ -1776,7 +1776,7 @@ class LoLLMsWebUI(LoLLMsAPPI):
|
|||||||
personality.model = None
|
personality.model = None
|
||||||
gc.collect()
|
gc.collect()
|
||||||
ASCIIColors.info("Reloading binding")
|
ASCIIColors.info("Reloading binding")
|
||||||
self.binding = BindingBuilder().build_binding(self.config, self.lollms_paths)
|
self.binding = BindingBuilder().build_binding(self.config, self.lollms_paths, self.notify)
|
||||||
ASCIIColors.info("Binding loaded successfully")
|
ASCIIColors.info("Binding loaded successfully")
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit 479329fd1e8399f48d165ff5db32130313dcb700
|
Subproject commit c59fa57547a8801ef07919c4a575fa3f73615c4f
|
@ -1 +1 @@
|
|||||||
Subproject commit cf2b947ce538161c4d9c55bc9cae9d248f115711
|
Subproject commit 4a27608db1652bae9a37124d15f094fdcc3d630f
|
Loading…
Reference in New Issue
Block a user