mirror of
https://github.com/ParisNeo/lollms-webui.git
synced 2024-12-18 12:16:22 +00:00
sync
This commit is contained in:
parent
3204962b6a
commit
eb936796ee
@ -1 +1 @@
|
||||
Subproject commit d259103fdf498c4d05b6b438f137bb15960c706d
|
||||
Subproject commit 759810a34972992a6e5b9f89b7734db1e7152d4a
|
@ -1401,14 +1401,14 @@ class LOLLMSWebUI(LOLLMSElfServer):
|
||||
self.personality.ui(sources_text)
|
||||
if len(context_details["skills"]) > 0:
|
||||
sources_text += '<div class="text-gray-400 mr-10px">Memories:</div>'
|
||||
sources_text += '<div class="mt-4 flex flex-col items-start gap-x-2 gap-y-1.5 text-sm" style="max-height: 500px; overflow-y: auto;">'
|
||||
sources_text += '<div class="mt-4 w-full flex flex-col items-start gap-x-2 gap-y-1.5 text-sm" style="max-height: 500px; overflow-y: auto;">'
|
||||
ind = 0
|
||||
for skill in context_details["skills"]:
|
||||
sources_text += f'''
|
||||
<div class="source-item">
|
||||
<button onclick="var details = document.getElementById('source-details-{ind}'); details.style.display = details.style.display === 'none' ? 'block' : 'none';" style="text-align: left; font-weight: bold;"><strong>Memory {ind}: {skill['title']}</strong> - ({skill['similarity']*100:.2f}%)</button>
|
||||
<div id="source-details-{ind}" style="display:none;">
|
||||
<div style="max-height: 200px; overflow-y: auto;">
|
||||
<div class="w-full" style="max-height: 200px; overflow-y: auto;">
|
||||
<pre>{skill['content']}</pre>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -6,16 +6,24 @@ import argparse
|
||||
from pathlib import Path
|
||||
from ascii_colors import ASCIIColors, trace_exception
|
||||
|
||||
import pipmaster as pm
|
||||
if not pm.is_installed("PyQt5"):
|
||||
pm.install("PyQt5")
|
||||
|
||||
import sys
|
||||
from PyQt5.QtWidgets import QApplication, QMessageBox
|
||||
|
||||
def show_error_dialog(message):
|
||||
try:
|
||||
import tkinter as tk
|
||||
from tkinter import messagebox
|
||||
root = tk.Tk()
|
||||
root.withdraw() # Hide the main window
|
||||
messagebox.showerror("Error", message)
|
||||
root.destroy()
|
||||
app = QApplication(sys.argv)
|
||||
msg = QMessageBox()
|
||||
msg.setIcon(QMessageBox.Critical)
|
||||
msg.setText(message)
|
||||
msg.setWindowTitle("Error")
|
||||
msg.exec_()
|
||||
except:
|
||||
ASCIIColors.error(message)
|
||||
|
||||
def run_git_pull():
|
||||
try:
|
||||
ASCIIColors.info("----------------> Updating the code <-----------------------")
|
||||
@ -88,6 +96,7 @@ def run_git_pull():
|
||||
ASCIIColors.error(error_message)
|
||||
# show_error_dialog(error_message)
|
||||
return False
|
||||
|
||||
def get_valid_input():
|
||||
while True:
|
||||
update_prompt = "New code is updated. Do you want to update the requirements? (y/n): "
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 1035dad7c07f08ad71b56326f556bc8afcff58fa
|
||||
Subproject commit 7d4ca0e643b44869882cbbe952192a3e397a74a0
|
Loading…
Reference in New Issue
Block a user