mirror of
https://github.com/ParisNeo/lollms-webui.git
synced 2024-12-18 20:17:50 +00:00
enhanced ui
This commit is contained in:
parent
e5959ff71e
commit
54970ab0ef
@ -1,5 +1,5 @@
|
||||
# =================== Lord Of Large Language Multimodal Systems Configuration file ===========================
|
||||
version: 51
|
||||
version: 52
|
||||
binding_name: null
|
||||
model_name: null
|
||||
|
||||
@ -100,7 +100,7 @@ audio_auto_send_input: true
|
||||
audio_silenceTimer: 5000
|
||||
|
||||
# Data vectorization
|
||||
use_discussions_history: false # Activate vectorizing previous conversations
|
||||
activate_ltm: false # Activate vectorizing previous conversations
|
||||
summerize_discussion: false # activate discussion summary (better but adds computation time)
|
||||
max_summary_size: 512 # in tokens
|
||||
data_vectorization_visualize_on_vectorization: false
|
||||
|
52
discussions/discussion.py
Normal file
52
discussions/discussion.py
Normal file
@ -0,0 +1,52 @@
|
||||
import yaml
|
||||
from typing import List
|
||||
from discussions.message import Message
|
||||
|
||||
class Discussion:
|
||||
"""
|
||||
Class representing a discussion.
|
||||
"""
|
||||
|
||||
def __init__(self, name):
|
||||
"""
|
||||
Initializes a new Discussion object.
|
||||
|
||||
Args:
|
||||
name (str): The name of the discussion.
|
||||
"""
|
||||
self.name = name
|
||||
self.messages:List[Message] = []
|
||||
|
||||
def load_messages(self):
|
||||
"""
|
||||
Loads the messages of the discussion from the discussion.yaml file.
|
||||
"""
|
||||
with open(f'{self.name}/discussion.yaml', 'r') as file:
|
||||
self.messages = yaml.load(file)
|
||||
|
||||
def save_messages(self):
|
||||
"""
|
||||
Saves the messages of the discussion to the discussion.yaml file.
|
||||
"""
|
||||
with open(f'{self.name}/discussion.yaml', 'w') as file:
|
||||
yaml.dump(self.messages, file)
|
||||
|
||||
def remove_message(self, message_index):
|
||||
"""
|
||||
Removes a message from the discussion.
|
||||
|
||||
Args:
|
||||
message_index (int): The index of the message to remove.
|
||||
"""
|
||||
self.messages.pop(message_index)
|
||||
self.save_messages()
|
||||
|
||||
def add_message(self, message: Message):
|
||||
"""
|
||||
Adds a new message to the discussion.
|
||||
|
||||
Args:
|
||||
message (Message): The message to add.
|
||||
"""
|
||||
self.messages.append(message)
|
||||
self.save_messages()
|
66
discussions/discussion_database.py
Normal file
66
discussions/discussion_database.py
Normal file
@ -0,0 +1,66 @@
|
||||
import os
|
||||
from typing import List
|
||||
from discussions.discussion import Discussion
|
||||
|
||||
class DiscussionDatabase:
|
||||
"""
|
||||
Class representing a discussion database.
|
||||
"""
|
||||
|
||||
def __init__(self, name, root_folder):
|
||||
"""
|
||||
Initializes a new DiscussionDatabase object.
|
||||
|
||||
Args:
|
||||
name (str): The name of the discussion database.
|
||||
root_folder (str): The root folder of the discussion database.
|
||||
"""
|
||||
self.name = name
|
||||
self.root_folder = root_folder
|
||||
self.discussions:List[Discussion] = {}
|
||||
|
||||
def load_discussions(self):
|
||||
"""
|
||||
Loads the discussions from the discussion database.
|
||||
"""
|
||||
for discussion_folder in os.listdir(self.root_folder):
|
||||
discussion = Discussion(discussion_folder)
|
||||
discussion.load_messages()
|
||||
self.discussions[discussion_folder] = discussion
|
||||
|
||||
def save_discussions(self):
|
||||
"""
|
||||
Saves the discussions to the discussion database.
|
||||
"""
|
||||
for discussion in self.discussions.values():
|
||||
discussion.save_messages()
|
||||
|
||||
def remove_discussion(self, discussion_name):
|
||||
"""
|
||||
Removes a discussion from the discussion database.
|
||||
|
||||
Args:
|
||||
discussion_name (str): The name of the discussion to remove.
|
||||
"""
|
||||
del self.discussions[discussion_name]
|
||||
os.rmdir(f'{self.root_folder}/{discussion_name}')
|
||||
|
||||
def list_discussions(self):
|
||||
"""
|
||||
Lists all the discussions in the discussion database.
|
||||
|
||||
Returns:
|
||||
List[str]: A list of discussion names.
|
||||
"""
|
||||
return list(self.discussions.keys())
|
||||
|
||||
def new_discussion(self, discussion_name):
|
||||
"""
|
||||
Creates a new discussion in the discussion database.
|
||||
|
||||
Args:
|
||||
discussion_name (str): The name of the new discussion.
|
||||
"""
|
||||
discussion = Discussion(discussion_name)
|
||||
self.discussions[discussion_name] = discussion
|
||||
os.mkdir(f'{self.root_folder}/{discussion_name}')
|
71
discussions/message.py
Normal file
71
discussions/message.py
Normal file
@ -0,0 +1,71 @@
|
||||
import datetime
|
||||
import json
|
||||
import yaml
|
||||
from enum import Enum
|
||||
|
||||
__project__ = "lollms-webui"
|
||||
__author__ = "ParisNeo"
|
||||
__description__ = ""
|
||||
|
||||
|
||||
class Role(Enum):
|
||||
SYSTEM = "system"
|
||||
AI = "ai"
|
||||
USER = "user"
|
||||
|
||||
|
||||
|
||||
class Message:
|
||||
"""
|
||||
Class representing a message in a discussion.
|
||||
"""
|
||||
|
||||
def __init__(self, sender, role:Role, model:str, content:str, sending_date=None, rank=0):
|
||||
"""
|
||||
Initializes a new Message object.
|
||||
|
||||
Args:
|
||||
sender (str): The name of the sender.
|
||||
role (str): The role of the sender (system, ai, user).
|
||||
model (str): The model name or "human".
|
||||
content (str): The content of the message.
|
||||
sending_date (datetime.datetime, optional): The sending date and time. Defaults to the current date and time.
|
||||
rank (int, optional): The rank of the message. Defaults to 0.
|
||||
"""
|
||||
self.sender = sender
|
||||
self.role = role
|
||||
self.model = model
|
||||
self.content = content
|
||||
self.sending_date = sending_date or datetime.datetime.now()
|
||||
self.rank = rank
|
||||
|
||||
def rank_up(self):
|
||||
"""
|
||||
Increases the rank of the message by 1.
|
||||
"""
|
||||
self.rank += 1
|
||||
|
||||
def rank_down(self):
|
||||
"""
|
||||
Decreases the rank of the message by 1.
|
||||
"""
|
||||
if self.rank > 0:
|
||||
self.rank -= 1
|
||||
|
||||
def to_json(self):
|
||||
"""
|
||||
Converts the message object to JSON format.
|
||||
|
||||
Returns:
|
||||
str: The message object in JSON format.
|
||||
"""
|
||||
return json.dumps(self.__dict__)
|
||||
|
||||
def to_yaml(self):
|
||||
"""
|
||||
Converts the message object to YAML format.
|
||||
|
||||
Returns:
|
||||
str: The message object in YAML format.
|
||||
"""
|
||||
return yaml.dump(self.__dict__)
|
@ -73,7 +73,7 @@ def select_database(data:DatabaseSelectionParameters):
|
||||
if lollmsElfServer.config.auto_save:
|
||||
lollmsElfServer.config.save_config()
|
||||
|
||||
if lollmsElfServer.config.data_vectorization_activate and lollmsElfServer.config.use_discussions_history:
|
||||
if lollmsElfServer.config.data_vectorization_activate and lollmsElfServer.config.activate_ltm:
|
||||
try:
|
||||
ASCIIColors.yellow("0- Detected discussion vectorization request")
|
||||
folder = lollmsElfServer.lollms_paths.personal_databases_path/"vectorized_dbs"
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 1b7245fe55924ad0183b2b18cc0cee91c6e86939
|
||||
Subproject commit 65d6699c4a92687a1180c5593b72faae179d11d7
|
@ -169,7 +169,7 @@ class LOLLMSWebUI(LOLLMSElfServer):
|
||||
ASCIIColors.success("ok")
|
||||
|
||||
# prepare vectorization
|
||||
if self.config.data_vectorization_activate and self.config.use_discussions_history:
|
||||
if self.config.data_vectorization_activate and self.config.activate_ltm:
|
||||
try:
|
||||
ASCIIColors.yellow("Loading long term memory")
|
||||
folder = self.lollms_paths.personal_databases_path/"vectorized_dbs"
|
||||
@ -777,7 +777,7 @@ class LOLLMSWebUI(LOLLMSElfServer):
|
||||
except:
|
||||
self.warning("Couldn't add documentation to the context. Please verify the vector database")
|
||||
# Check if there is discussion knowledge to add to the prompt
|
||||
if self.config.use_discussions_history and self.long_term_memory is not None:
|
||||
if self.config.activate_ltm and self.long_term_memory is not None:
|
||||
if knowledge=="":
|
||||
knowledge="!@>knowledge:\n"
|
||||
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
6
web/dist/assets/rec_off-eb9b60b6.svg
vendored
Normal file
6
web/dist/assets/rec_off-eb9b60b6.svg
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
|
||||
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="50" height="50" viewBox="0 0 50 50">
|
||||
<circle cx="50" cy="50" r="45" fill="black" />
|
||||
</svg>
|
After Width: | Height: | Size: 297 B |
44
web/dist/assets/rec_off-fb27b641.svg
vendored
44
web/dist/assets/rec_off-fb27b641.svg
vendored
@ -1,44 +0,0 @@
|
||||
<?xml version="1.0" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
|
||||
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
|
||||
<svg version="1.0" xmlns="http://www.w3.org/2000/svg"
|
||||
width="794.000000pt" height="596.000000pt" viewBox="0 0 794.000000 596.000000"
|
||||
preserveAspectRatio="xMidYMid meet">
|
||||
|
||||
<g transform="translate(0.000000,596.000000) scale(0.100000,-0.100000)"
|
||||
fill="#000000" stroke="none">
|
||||
<path d="M505 4469 c-43 -12 -102 -64 -128 -112 -21 -41 -22 -52 -25 -419 -3
|
||||
-338 -1 -381 14 -413 33 -70 128 -88 186 -36 l33 29 3 361 3 360 354 3 c342 3
|
||||
355 4 382 24 34 26 58 83 49 120 -4 15 -22 42 -41 61 l-33 33 -384 -1 c-210 0
|
||||
-396 -5 -413 -10z"/>
|
||||
<path d="M6606 4449 c-45 -39 -55 -84 -30 -136 35 -71 44 -73 431 -73 l342 0
|
||||
3 -361 3 -361 33 -29 c58 -52 153 -34 186 36 15 32 17 75 14 413 -3 367 -4
|
||||
378 -25 419 -27 50 -86 100 -133 113 -20 6 -198 10 -412 10 l-377 0 -35 -31z"/>
|
||||
<path d="M1631 3719 c-278 -54 -497 -253 -582 -529 -31 -98 -34 -299 -6 -400
|
||||
40 -149 130 -291 243 -384 132 -109 274 -164 444 -173 351 -18 654 194 760
|
||||
532 34 107 39 276 11 385 -40 164 -133 312 -256 413 -77 64 -219 131 -317 151
|
||||
-82 17 -225 19 -297 5z"/>
|
||||
<path d="M5921 3719 c-270 -53 -462 -246 -525 -529 -50 -221 -16 -475 85 -647
|
||||
19 -32 66 -89 104 -128 125 -126 285 -185 502 -185 314 0 543 154 618 413 26
|
||||
90 29 88 -146 85 l-151 -3 -19 -49 c-21 -56 -77 -119 -129 -146 -84 -43 -229
|
||||
-50 -330 -15 -104 36 -187 128 -231 255 -19 54 -23 87 -23 200 -1 147 9 198
|
||||
55 290 75 151 237 228 417 200 120 -20 202 -83 242 -188 l18 -47 156 -3 c175
|
||||
-3 164 -9 141 78 -56 211 -221 365 -442 414 -78 17 -266 20 -342 5z"/>
|
||||
<path d="M2975 3698 c-3 -7 -4 -335 -3 -728 l3 -715 143 -3 142 -3 0 281 0
|
||||
280 98 0 98 0 131 -277 130 -278 161 -3 c140 -2 162 0 162 13 0 8 -63 141
|
||||
-140 295 -77 154 -140 283 -140 287 0 5 25 21 55 36 246 129 289 498 81 695
|
||||
-67 63 -137 97 -241 117 -103 20 -673 22 -680 3z m650 -260 c67 -36 105 -102
|
||||
105 -183 0 -94 -39 -161 -115 -196 -33 -16 -66 -19 -197 -19 l-158 0 0 211 0
|
||||
211 168 -4 c130 -3 174 -7 197 -20z"/>
|
||||
<path d="M4245 3698 c-3 -7 -4 -335 -3 -728 l3 -715 478 -3 477 -2 0 120 0
|
||||
120 -335 0 -335 0 0 190 0 190 303 2 302 3 0 115 0 115 -302 3 -303 2 0 180 0
|
||||
180 335 0 335 0 0 120 0 120 -475 0 c-371 0 -477 -3 -480 -12z"/>
|
||||
<path d="M409 2485 c-15 -8 -34 -30 -43 -50 -15 -32 -17 -75 -14 -413 3 -367
|
||||
4 -378 25 -419 27 -51 82 -96 132 -112 26 -7 162 -11 414 -11 l376 0 35 31
|
||||
c45 39 55 84 30 136 -35 71 -44 73 -431 73 l-342 0 -3 361 -3 361 -33 29 c-37
|
||||
33 -97 39 -143 14z"/>
|
||||
<path d="M7388 2471 l-33 -29 -3 -361 -3 -361 -342 0 c-387 0 -396 -2 -431
|
||||
-73 -25 -52 -15 -97 30 -136 l35 -31 376 0 c252 0 388 4 414 11 50 16 105 61
|
||||
132 112 21 41 22 52 25 419 3 338 1 381 -14 413 -33 70 -128 88 -186 36z"/>
|
||||
</g>
|
||||
</svg>
|
Before Width: | Height: | Size: 2.6 KiB |
6
web/dist/assets/rec_on-3d133f95.svg
vendored
Normal file
6
web/dist/assets/rec_on-3d133f95.svg
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="50" height="50" viewBox="0 0 50 50">
|
||||
<circle cx="50" cy="50" r="45" fill="red" />
|
||||
</svg>
|
After Width: | Height: | Size: 258 B |
105
web/dist/assets/rec_on-f8235a7b.svg
vendored
105
web/dist/assets/rec_on-f8235a7b.svg
vendored
@ -1,105 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
width="210mm"
|
||||
height="297mm"
|
||||
viewBox="0 0 210 297"
|
||||
version="1.1"
|
||||
id="svg1"
|
||||
xml:space="preserve"
|
||||
inkscape:export-filename="bitmap.svg"
|
||||
inkscape:export-xdpi="96"
|
||||
inkscape:export-ydpi="96"
|
||||
inkscape:version="1.3.2 (091e20e, 2023-11-25, custom)"
|
||||
sodipodi:docname="drawing.svg"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"><sodipodi:namedview
|
||||
id="namedview1"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#000000"
|
||||
borderopacity="0.25"
|
||||
inkscape:showpageshadow="2"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pagecheckerboard="true"
|
||||
inkscape:deskcolor="#d1d1d1"
|
||||
inkscape:document-units="mm"
|
||||
inkscape:zoom="0.73139029"
|
||||
inkscape:cx="396.50513"
|
||||
inkscape:cy="561.25984"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1017"
|
||||
inkscape:window-x="1912"
|
||||
inkscape:window-y="-8"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="layer2" /><defs
|
||||
id="defs1"><pattern
|
||||
inkscape:collect="always"
|
||||
xlink:href="#pattern6-7"
|
||||
preserveAspectRatio="xMidYMid"
|
||||
id="pattern20"
|
||||
patternTransform="translate(190,350)" /><pattern
|
||||
inkscape:collect="always"
|
||||
xlink:href="#pattern6-7"
|
||||
preserveAspectRatio="xMidYMid"
|
||||
id="pattern19"
|
||||
patternTransform="translate(190,350)" /><pattern
|
||||
patternUnits="userSpaceOnUse"
|
||||
width="29"
|
||||
height="20"
|
||||
patternTransform="translate(190,350)"
|
||||
preserveAspectRatio="xMidYMid"
|
||||
style="fill:#000000"
|
||||
id="pattern6-7"
|
||||
inkscape:label=""
|
||||
inkscape:collect="always"
|
||||
inkscape:isstock="true"><path
|
||||
style="fill:none;stroke:#000000;stroke-width:10;stroke-linecap:butt;stroke-dasharray:none;paint-order:stroke markers fill;stop-color:#000000"
|
||||
d="M 0,5 C 19,5 10,15 29,15"
|
||||
id="path4-2"
|
||||
sodipodi:nodetypes="cc" /></pattern></defs><g
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"><g
|
||||
transform="matrix(0.02583208,0,0,-0.02538984,5.2493106,222.7147)"
|
||||
fill="#000000"
|
||||
stroke="none"
|
||||
id="g8"><path
|
||||
d="m 505,4469 c -43,-12 -102,-64 -128,-112 -21,-41 -22,-52 -25,-419 -3,-338 -1,-381 14,-413 33,-70 128,-88 186,-36 l 33,29 3,361 3,360 354,3 c 342,3 355,4 382,24 34,26 58,83 49,120 -4,15 -22,42 -41,61 l -33,33 -384,-1 c -210,0 -396,-5 -413,-10 z"
|
||||
id="path1" /><path
|
||||
d="m 6606,4449 c -45,-39 -55,-84 -30,-136 35,-71 44,-73 431,-73 h 342 l 3,-361 3,-361 33,-29 c 58,-52 153,-34 186,36 15,32 17,75 14,413 -3,367 -4,378 -25,419 -27,50 -86,100 -133,113 -20,6 -198,10 -412,10 h -377 z"
|
||||
id="path2" /><path
|
||||
d="m 1631,3719 c -278,-54 -497,-253 -582,-529 -31,-98 -34,-299 -6,-400 40,-149 130,-291 243,-384 132,-109 274,-164 444,-173 351,-18 654,194 760,532 34,107 39,276 11,385 -40,164 -133,312 -256,413 -77,64 -219,131 -317,151 -82,17 -225,19 -297,5 z"
|
||||
id="path3" /><path
|
||||
d="m 5921,3719 c -270,-53 -462,-246 -525,-529 -50,-221 -16,-475 85,-647 19,-32 66,-89 104,-128 125,-126 285,-185 502,-185 314,0 543,154 618,413 26,90 29,88 -146,85 l -151,-3 -19,-49 c -21,-56 -77,-119 -129,-146 -84,-43 -229,-50 -330,-15 -104,36 -187,128 -231,255 -19,54 -23,87 -23,200 -1,147 9,198 55,290 75,151 237,228 417,200 120,-20 202,-83 242,-188 l 18,-47 156,-3 c 175,-3 164,-9 141,78 -56,211 -221,365 -442,414 -78,17 -266,20 -342,5 z"
|
||||
id="path4" /><path
|
||||
d="m 2975,3698 c -3,-7 -4,-335 -3,-728 l 3,-715 143,-3 142,-3 v 281 280 h 98 98 l 131,-277 130,-278 161,-3 c 140,-2 162,0 162,13 0,8 -63,141 -140,295 -77,154 -140,283 -140,287 0,5 25,21 55,36 246,129 289,498 81,695 -67,63 -137,97 -241,117 -103,20 -673,22 -680,3 z m 650,-260 c 67,-36 105,-102 105,-183 0,-94 -39,-161 -115,-196 -33,-16 -66,-19 -197,-19 h -158 v 211 211 l 168,-4 c 130,-3 174,-7 197,-20 z"
|
||||
id="path5" /><path
|
||||
d="m 4245,3698 c -3,-7 -4,-335 -3,-728 l 3,-715 478,-3 477,-2 v 120 120 h -335 -335 v 190 190 l 303,2 302,3 v 115 115 l -302,3 -303,2 v 180 180 h 335 335 v 120 120 h -475 c -371,0 -477,-3 -480,-12 z"
|
||||
id="path6" /><path
|
||||
d="m 409,2485 c -15,-8 -34,-30 -43,-50 -15,-32 -17,-75 -14,-413 3,-367 4,-378 25,-419 27,-51 82,-96 132,-112 26,-7 162,-11 414,-11 h 376 l 35,31 c 45,39 55,84 30,136 -35,71 -44,73 -431,73 H 591 l -3,361 -3,361 -33,29 c -37,33 -97,39 -143,14 z"
|
||||
id="path7" /><path
|
||||
d="m 7388,2471 -33,-29 -3,-361 -3,-361 h -342 c -387,0 -396,-2 -431,-73 -25,-52 -15,-97 30,-136 l 35,-31 h 376 c 252,0 388,4 414,11 50,16 105,61 132,112 21,41 22,52 25,419 3,338 1,381 -14,413 -33,70 -128,88 -186,36 z"
|
||||
id="path8" /></g><path
|
||||
style="fill:#000000;stroke-width:1.36726"
|
||||
d="m 178.42731,625.49092 c -27.25137,-5.46989 -49.08276,-26.05162 -56.06414,-52.85493 -9.49876,-36.46822 14.50171,-76.07706 52.01917,-85.84912 21.29289,-5.54609 47.02477,0.19022 64.92177,14.47277 8.0352,6.41242 18.34576,21.53181 22.10793,32.41906 4.30468,12.45716 4.28346,32.69217 -0.0468,44.67188 -3.76993,10.42943 -13.73585,25.09561 -21.14419,31.1165 -17.3789,14.12413 -40.88738,20.22015 -61.7937,16.02384 z"
|
||||
id="path9"
|
||||
transform="scale(0.26458333)" /></g><g
|
||||
inkscape:groupmode="layer"
|
||||
id="layer2"
|
||||
inkscape:label="Layer 2"><path
|
||||
style="fill:#ff0000;stroke-width:1.36726"
|
||||
d="m 177.06005,625.37926 c -25.26183,-5.11902 -47.98402,-26.97088 -54.64772,-52.55453 -8.0771,-31.01008 8.01124,-65.64386 37.29985,-80.29635 12.66708,-6.33708 22.65747,-8.34652 37.17312,-7.47689 26.5606,1.59124 49.40113,16.59784 60.84478,39.97599 18.67442,38.14984 -0.47922,83.62556 -41.22311,97.8744 -9.3945,3.28542 -29.29247,4.53506 -39.44692,2.47738 z"
|
||||
id="path10"
|
||||
transform="scale(0.26458333)" /><path
|
||||
style="fill:url(#pattern20);fill-opacity:1;stroke-width:1.36726"
|
||||
d="m 313.44414,624.5561 -3.07633,-0.59253 v -68.08896 -68.08897 l 5.12722,-0.84747 c 7.62433,-1.26023 40.34287,-1.00795 53.86576,0.41532 14.51368,1.52756 23.62457,5.29292 30.974,12.80096 18.70532,19.10901 14.46385,52.41469 -8.1438,63.94825 -2.89117,1.47496 -5.25668,3.5983 -5.25668,4.71853 0,1.12022 5.86298,13.75039 13.02885,28.06704 7.16587,14.31665 12.66696,26.61584 12.22464,27.33151 -0.87782,1.42035 -19.53365,1.5034 -25.61688,0.11403 -3.3518,-0.76554 -5.20579,-3.85466 -16.31452,-27.18342 l -12.53298,-26.31973 h -10.00521 -10.00522 v 27.34518 27.34518 l -10.59626,-0.1862 c -5.82794,-0.1024 -11.98061,-0.45283 -13.67259,-0.77872 z m 60.79781,-76.5176 c 6.78546,-3.21991 9.94652,-9.05285 9.95273,-18.36524 0.006,-9.42731 -3.9787,-16.1715 -10.9803,-18.58302 -2.60594,-0.89754 -11.65981,-1.66663 -20.11973,-1.70907 l -15.38166,-0.0772 v 20.50888 20.50889 h 15.85866 c 11.98158,0 17.035,-0.55821 20.6703,-2.28327 z"
|
||||
id="path11"
|
||||
transform="scale(0.26458333)" /><path
|
||||
style="fill:url(#pattern19);fill-opacity:1;stroke-width:1.36726"
|
||||
d="m 313.44414,624.5561 -3.07633,-0.59253 v -68.08896 -68.08897 l 5.12722,-0.84747 c 7.62433,-1.26023 40.34287,-1.00795 53.86576,0.41532 14.51368,1.52756 23.62457,5.29292 30.974,12.80096 18.70532,19.10901 14.46385,52.41469 -8.1438,63.94825 -2.89117,1.47496 -5.25668,3.5983 -5.25668,4.71853 0,1.12022 5.86298,13.75039 13.02885,28.06704 7.16587,14.31665 12.66696,26.61584 12.22464,27.33151 -0.87782,1.42035 -19.53365,1.5034 -25.61688,0.11403 -3.3518,-0.76554 -5.20579,-3.85466 -16.31452,-27.18342 l -12.53298,-26.31973 h -10.00521 -10.00522 v 27.34518 27.34518 l -10.59626,-0.1862 c -5.82794,-0.1024 -11.98061,-0.45283 -13.67259,-0.77872 z m 60.79781,-76.5176 c 6.78546,-3.21991 9.94652,-9.05285 9.95273,-18.36524 0.006,-9.42731 -3.9787,-16.1715 -10.9803,-18.58302 -2.60594,-0.89754 -11.65981,-1.66663 -20.11973,-1.70907 l -15.38166,-0.0772 v 20.50888 20.50889 h 15.85866 c 11.98158,0 17.035,-0.55821 20.6703,-2.28327 z"
|
||||
id="path12"
|
||||
transform="scale(0.26458333)" /></g></svg>
|
Before Width: | Height: | Size: 8.0 KiB |
4
web/dist/index.html
vendored
4
web/dist/index.html
vendored
@ -6,8 +6,8 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>LoLLMS WebUI - Welcome</title>
|
||||
<script type="module" crossorigin src="/assets/index-90397920.js"></script>
|
||||
<link rel="stylesheet" href="/assets/index-44483827.css">
|
||||
<script type="module" crossorigin src="/assets/index-134f9e6d.js"></script>
|
||||
<link rel="stylesheet" href="/assets/index-3521e65e.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
|
@ -129,7 +129,7 @@ export default {
|
||||
this.show = true;
|
||||
},
|
||||
hide(){
|
||||
self.show = false;
|
||||
this.show = false;
|
||||
},
|
||||
submitForm() {
|
||||
axios.post('/set_personality_config', {
|
||||
|
@ -94,12 +94,6 @@
|
||||
<i data-feather="check"></i>
|
||||
</button>
|
||||
</div>
|
||||
<button v-if="!showBrainConfirmation" title="Activate Long term Memory" class="text-2xl hover:text-secondary duration-75 active:scale-90"
|
||||
@click="toggleLTM()">
|
||||
<img v-if="loading" :src="SVGOrangeBrain" width="25" height="25" class="animate-pulse" title="Applying config, please stand by...">
|
||||
<img v-else-if="UseDiscussionHistory" :src="SVGGreenBrain" width="25" height="25">
|
||||
<img v-else :src="SVGRedBrain" width="25" height="25">
|
||||
</button>
|
||||
<div v-if="loading" title="Loading.." class="flex flex-row flex-grow justify-end">
|
||||
<!-- SPINNER -->
|
||||
<div role="status">
|
||||
@ -542,7 +536,7 @@ export default {
|
||||
|
||||
},
|
||||
async toggleLTM(){
|
||||
this.$store.state.config.use_discussions_history =! this.$store.state.config.use_discussions_history;
|
||||
this.$store.state.config.activate_ltm =! this.$store.state.config.activate_ltm;
|
||||
await this.applyConfiguration();
|
||||
socket.emit('upgrade_vectorization');
|
||||
},
|
||||
@ -2049,7 +2043,7 @@ export default {
|
||||
return trimmed_name;
|
||||
},
|
||||
UseDiscussionHistory() {
|
||||
return this.$store.state.config.use_discussions_history;
|
||||
return this.$store.state.config.activate_ltm;
|
||||
},
|
||||
isReady:{
|
||||
|
||||
|
@ -491,15 +491,15 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="min-width: 200px;">
|
||||
<label for="use_discussions_history" class="text-sm font-bold" style="margin-right: 1rem;">Activate discussion vectorization:</label>
|
||||
<label for="activate_ltm" class="text-sm font-bold" style="margin-right: 1rem;">Activate Long term memory:</label>
|
||||
</td>
|
||||
<td>
|
||||
<div class="flex flex-row">
|
||||
<input
|
||||
type="checkbox"
|
||||
id="use_discussions_history"
|
||||
id="activate_ltm"
|
||||
required
|
||||
v-model="configFile.use_discussions_history"
|
||||
v-model="configFile.activate_ltm"
|
||||
@change="settingsChanged=true"
|
||||
class="mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"
|
||||
>
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 2e1be48cd41d3975c749d62f6e305439e1b1f1e4
|
||||
Subproject commit f8be4a8af362fa84a5104e29806338aded03b278
|
Loading…
Reference in New Issue
Block a user