mirror of
https://github.com/ParisNeo/lollms-webui.git
synced 2025-01-18 02:39:47 +00:00
upgraded
This commit is contained in:
parent
f906c0d98e
commit
9305887970
@ -858,6 +858,7 @@ class LoLLMsAPPI(LollmsApplication):
|
||||
self.lollms_paths,
|
||||
self.config,
|
||||
model=self.model,
|
||||
app=self,
|
||||
selected_language=personality.split(":")[1] if ":" in personality else None,
|
||||
run_scripts=True)
|
||||
mounted_personalities.append(personality)
|
||||
@ -872,6 +873,7 @@ class LoLLMsAPPI(LollmsApplication):
|
||||
self.lollms_paths,
|
||||
self.config,
|
||||
self.model,
|
||||
app = self,
|
||||
run_scripts=True,
|
||||
selected_language=personality.split(":")[1] if ":" in personality else None,
|
||||
installation_option=InstallOption.FORCE_INSTALL)
|
||||
|
14
app.py
14
app.py
@ -222,6 +222,8 @@ class LoLLMsWebUI(LoLLMsAPPI):
|
||||
|
||||
|
||||
|
||||
self.add_endpoint("/post_to_personality", "post_to_personality", self.post_to_personality, methods=["POST"])
|
||||
|
||||
|
||||
self.add_endpoint("/install_model_from_path", "install_model_from_path", self.install_model_from_path, methods=["GET"])
|
||||
|
||||
@ -1169,6 +1171,7 @@ class LoLLMsWebUI(LoLLMsAPPI):
|
||||
self.lollms_paths,
|
||||
self.config,
|
||||
model=self.model,
|
||||
app=self,
|
||||
run_scripts=True,installation_option=InstallOption.FORCE_INSTALL)
|
||||
return jsonify({"status":True})
|
||||
except Exception as ex:
|
||||
@ -1179,6 +1182,14 @@ class LoLLMsWebUI(LoLLMsAPPI):
|
||||
except Exception as e:
|
||||
return jsonify({"status":False, 'error':str(e)})
|
||||
|
||||
def post_to_personality(self):
|
||||
data = request.get_json()
|
||||
if hasattr(self.personality.processor,'handle_request'):
|
||||
return self.personality.processor.handle_request(data)
|
||||
else:
|
||||
return jsonify({})
|
||||
|
||||
|
||||
def reinstall_binding(self):
|
||||
try:
|
||||
data = request.get_json()
|
||||
@ -1396,6 +1407,8 @@ class LoLLMsWebUI(LoLLMsAPPI):
|
||||
ASCIIColors.error(f"nok : Personality not found @ {pth}")
|
||||
return jsonify({"status": False, "error":f"Personality not found @ {pth}"})
|
||||
|
||||
|
||||
|
||||
def p_remount_personality(self):
|
||||
print("- Remounting personality")
|
||||
try:
|
||||
@ -1587,6 +1600,7 @@ class LoLLMsWebUI(LoLLMsAPPI):
|
||||
self.lollms_paths,
|
||||
self.config,
|
||||
model=self.model,
|
||||
app=self,
|
||||
run_scripts=True)
|
||||
if personality.processor is not None:
|
||||
if hasattr(personality.processor,"personality_config"):
|
||||
|
Loading…
Reference in New Issue
Block a user