mirror of
https://github.com/ParisNeo/lollms-webui.git
synced 2025-02-20 09:16:15 +00:00
fix
This commit is contained in:
parent
d08a288be3
commit
a329edc3ef
@ -13,11 +13,12 @@ from fastapi import APIRouter, Request
|
||||
import pkg_resources
|
||||
from lollms_webui import LOLLMSWebUI
|
||||
from ascii_colors import ASCIIColors
|
||||
from lollms.utilities import load_config
|
||||
from lollms.utilities import load_config, run_async
|
||||
from pathlib import Path
|
||||
from typing import List
|
||||
import sys
|
||||
import socketio
|
||||
import time
|
||||
# ----------------------- Defining router and main class ------------------------------
|
||||
|
||||
# Create an instance of the LoLLMSWebUI class
|
||||
@ -35,9 +36,9 @@ async def get_lollms_webui_version():
|
||||
async def restart_program():
|
||||
"""Restart the program."""
|
||||
# Stop the socketIO server
|
||||
lollmsElfServer.sio.shutdown()
|
||||
run_async(lollmsElfServer.sio.shutdown)
|
||||
# Sleep for 1 second before rebooting
|
||||
lollmsElfServer.sio.sleep(1)
|
||||
time.sleep(1)
|
||||
# Reboot the program
|
||||
lollmsElfServer.sio.reboot = True
|
||||
|
||||
@ -55,7 +56,9 @@ async def update_software():
|
||||
ASCIIColors.info("")
|
||||
ASCIIColors.info("")
|
||||
# Stop the socketIO server
|
||||
lollmsElfServer.sio.shutdown()
|
||||
run_async(lollmsElfServer.sio.shutdown)
|
||||
# Sleep for 1 second before rebooting
|
||||
time.sleep(1)
|
||||
|
||||
# Run the update script using the provided arguments
|
||||
lollmsElfServer.run_update_script(lollmsElfServer.args)
|
||||
|
@ -75,7 +75,7 @@ def terminate_thread(thread):
|
||||
raise SystemError("Failed to terminate the thread.")
|
||||
else:
|
||||
ASCIIColors.yellow("Canceled successfully")# The current version of the webui
|
||||
lollms_webui_version="9.0 (alpha)"
|
||||
lollms_webui_version="9.0"
|
||||
|
||||
|
||||
|
||||
@ -917,8 +917,10 @@ class LOLLMSWebUI(LOLLMSElfServer):
|
||||
message_tokens = full_message_list[i]
|
||||
discussion_messages += self.model.detokenize(message_tokens)
|
||||
|
||||
ai_prefix = self.model.detokenize(full_message_list[-1])
|
||||
|
||||
if len(full_message_list)>0:
|
||||
ai_prefix = self.model.detokenize(full_message_list[-1])
|
||||
else:
|
||||
ai_prefix = ""
|
||||
# Build the final prompt by concatenating the conditionning and discussion messages
|
||||
prompt_data = conditionning + documentation + knowledge + user_description + discussion_messages + positive_boost + negative_boost + force_language + fun_mode + ai_prefix
|
||||
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 92864fe2e4184689be4b0887a4b8030de507e243
|
||||
Subproject commit 278c53c64184e1e033da4623edefaee508d66b2a
|
Loading…
x
Reference in New Issue
Block a user