mirror of
https://github.com/ParisNeo/lollms-webui.git
synced 2025-01-30 16:14:05 +00:00
repared methods
This commit is contained in:
parent
d75112bcdf
commit
d78ff97967
@ -403,7 +403,7 @@ class LoLLMsAPPI(LollmsApplication):
|
|||||||
message = data["prompt"]
|
message = data["prompt"]
|
||||||
ump = "!@>"+self.config.user_name+": " if self.config.use_user_name_in_discussions else self.personality.user_message_prefix
|
ump = "!@>"+self.config.user_name+": " if self.config.use_user_name_in_discussions else self.personality.user_message_prefix
|
||||||
message_id = self.current_discussion.add_message(
|
message_id = self.current_discussion.add_message(
|
||||||
ump,
|
ump.replace("!@>","").replace(":",""),
|
||||||
message,
|
message,
|
||||||
message_type=MSG_TYPE.MSG_TYPE_FULL.value,
|
message_type=MSG_TYPE.MSG_TYPE_FULL.value,
|
||||||
parent=self.message_id
|
parent=self.message_id
|
||||||
@ -653,9 +653,9 @@ class LoLLMsAPPI(LollmsApplication):
|
|||||||
|
|
||||||
link_text = self.personality.link_text
|
link_text = self.personality.link_text
|
||||||
if not is_continue:
|
if not is_continue:
|
||||||
self.full_message_list.append("\n!@>"+message["sender"]+": "+message["content"].strip()+self.personality.link_text+self.personality.ai_message_prefix)
|
self.full_message_list.append("\n!@>"+message["sender"].replace(":","")+": "+message["content"].strip()+self.personality.link_text+self.personality.ai_message_prefix)
|
||||||
else:
|
else:
|
||||||
self.full_message_list.append("\n!@>"+message["sender"]+": "+message["content"].strip())
|
self.full_message_list.append("\n!@>"+message["sender"].replace(":","")+": "+message["content"].strip())
|
||||||
|
|
||||||
|
|
||||||
composed_messages = link_text.join(self.full_message_list)
|
composed_messages = link_text.join(self.full_message_list)
|
||||||
@ -943,12 +943,14 @@ class LoLLMsAPPI(LollmsApplication):
|
|||||||
ASCIIColors.success(f" ║ Done ║ ")
|
ASCIIColors.success(f" ║ Done ║ ")
|
||||||
ASCIIColors.success(f" ╚══════════════════════════════════════════════════╝ ")
|
ASCIIColors.success(f" ╚══════════════════════════════════════════════════╝ ")
|
||||||
else:
|
else:
|
||||||
|
ump = "!@>"+self.config.user_name+": " if self.config.use_user_name_in_discussions else self.personality.user_message_prefix
|
||||||
|
|
||||||
self.cancel_gen = False
|
self.cancel_gen = False
|
||||||
#No discussion available
|
#No discussion available
|
||||||
ASCIIColors.warning("No discussion selected!!!")
|
ASCIIColors.warning("No discussion selected!!!")
|
||||||
self.socketio.emit('message', {
|
self.socketio.emit('message', {
|
||||||
'data': "No discussion selected!!!",
|
'data': "No discussion selected!!!",
|
||||||
'user_message_id':self.current_user_message_id,
|
'user_message_id':ump.replace("!@>","").replace(":",""),
|
||||||
'ai_message_id':self.current_ai_message_id,
|
'ai_message_id':self.current_ai_message_id,
|
||||||
'discussion_id':0,
|
'discussion_id':0,
|
||||||
'message_type': MSG_TYPE.MSG_TYPE_EXCEPTION.value
|
'message_type': MSG_TYPE.MSG_TYPE_EXCEPTION.value
|
||||||
|
5
app.py
5
app.py
@ -517,9 +517,6 @@ class LoLLMsWebUI(LoLLMsAPPI):
|
|||||||
elif setting_name== "override_personality_model_parameters":
|
elif setting_name== "override_personality_model_parameters":
|
||||||
self.config["override_personality_model_parameters"]=bool(data['setting_value'])
|
self.config["override_personality_model_parameters"]=bool(data['setting_value'])
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
elif setting_name== "model_name":
|
elif setting_name== "model_name":
|
||||||
self.config["model_name"]=data['setting_value']
|
self.config["model_name"]=data['setting_value']
|
||||||
if self.config["model_name"] is not None:
|
if self.config["model_name"] is not None:
|
||||||
@ -561,7 +558,7 @@ class LoLLMsWebUI(LoLLMsAPPI):
|
|||||||
|
|
||||||
else:
|
else:
|
||||||
if data['setting_name'] in self.config.config.keys():
|
if data['setting_name'] in self.config.config.keys():
|
||||||
data['setting_name'] = data['setting_value']
|
self.config[data['setting_name']] = data['setting_value']
|
||||||
else:
|
else:
|
||||||
if self.config["debug"]:
|
if self.config["debug"]:
|
||||||
print(f"Configuration {data['setting_name']} couldn't be set to {data['setting_value']}")
|
print(f"Configuration {data['setting_name']} couldn't be set to {data['setting_value']}")
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
.dot{width:10px;height:10px;border-radius:50%}.dot-green{background-color:green}.dot-red{background-color:red}.scrollbar[data-v-3cb88319]{scrollbar-width:thin;scrollbar-color:var(--scrollbar-thumb-color) var(--scrollbar-track-color);white-space:pre-wrap;overflow-wrap:break-word}.scrollbar[data-v-3cb88319]::-webkit-scrollbar{width:8px}.scrollbar[data-v-3cb88319]::-webkit-scrollbar-track{background-color:var(--scrollbar-track-color)}.scrollbar[data-v-3cb88319]::-webkit-scrollbar-thumb{background-color:var(--scrollbar-thumb-color);border-radius:4px}.scrollbar[data-v-3cb88319]::-webkit-scrollbar-thumb:hover{background-color:var(--scrollbar-thumb-hover-color)}.toastItem-enter-active[data-v-3ffdabf3],.toastItem-leave-active[data-v-3ffdabf3]{transition:all .5s ease}.toastItem-enter-from[data-v-3ffdabf3],.toastItem-leave-to[data-v-3ffdabf3]{opacity:0;transform:translate(-30px)}.list-move[data-v-8beb44a6],.list-enter-active[data-v-8beb44a6],.list-leave-active[data-v-8beb44a6]{transition:all .5s ease}.list-enter-from[data-v-8beb44a6]{transform:translatey(-30px)}.list-leave-to[data-v-8beb44a6]{opacity:0;transform:translatey(30px)}.list-leave-active[data-v-8beb44a6]{position:absolute}.bounce-enter-active[data-v-8beb44a6]{animation:bounce-in-8beb44a6 .5s}.bounce-leave-active[data-v-8beb44a6]{animation:bounce-in-8beb44a6 .5s reverse}@keyframes bounce-in-8beb44a6{0%{transform:scale(0)}50%{transform:scale(1.25)}to{transform:scale(1)}}.bg-primary-light[data-v-8beb44a6]{background-color:#0ff}.hover[data-v-8beb44a6]:bg-primary-light:hover{background-color:#7fffd4}.font-bold[data-v-8beb44a6]{font-weight:700}.hljs-comment,.hljs-quote{color:#7285b7}.hljs-deletion,.hljs-name,.hljs-regexp,.hljs-selector-class,.hljs-selector-id,.hljs-tag,.hljs-template-variable,.hljs-variable{color:#ff9da4}.hljs-built_in,.hljs-link,.hljs-literal,.hljs-meta,.hljs-number,.hljs-params,.hljs-type{color:#ffc58f}.hljs-attribute{color:#ffeead}.hljs-addition,.hljs-bullet,.hljs-string,.hljs-symbol{color:#d1f1a9}.hljs-section,.hljs-title{color:#bbdaff}.hljs-keyword,.hljs-selector-tag{color:#ebbbff}.hljs{background:#002451;color:#fff}pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}/*!
|
.dot{width:10px;height:10px;border-radius:50%}.dot-green{background-color:green}.dot-red{background-color:red}.scrollbar[data-v-3cb88319]{scrollbar-width:thin;scrollbar-color:var(--scrollbar-thumb-color) var(--scrollbar-track-color);white-space:pre-wrap;overflow-wrap:break-word}.scrollbar[data-v-3cb88319]::-webkit-scrollbar{width:8px}.scrollbar[data-v-3cb88319]::-webkit-scrollbar-track{background-color:var(--scrollbar-track-color)}.scrollbar[data-v-3cb88319]::-webkit-scrollbar-thumb{background-color:var(--scrollbar-thumb-color);border-radius:4px}.scrollbar[data-v-3cb88319]::-webkit-scrollbar-thumb:hover{background-color:var(--scrollbar-thumb-hover-color)}.toastItem-enter-active[data-v-3ffdabf3],.toastItem-leave-active[data-v-3ffdabf3]{transition:all .5s ease}.toastItem-enter-from[data-v-3ffdabf3],.toastItem-leave-to[data-v-3ffdabf3]{opacity:0;transform:translate(-30px)}.list-move[data-v-cdb9dcf7],.list-enter-active[data-v-cdb9dcf7],.list-leave-active[data-v-cdb9dcf7]{transition:all .5s ease}.list-enter-from[data-v-cdb9dcf7]{transform:translatey(-30px)}.list-leave-to[data-v-cdb9dcf7]{opacity:0;transform:translatey(30px)}.list-leave-active[data-v-cdb9dcf7]{position:absolute}.bounce-enter-active[data-v-cdb9dcf7]{animation:bounce-in-cdb9dcf7 .5s}.bounce-leave-active[data-v-cdb9dcf7]{animation:bounce-in-cdb9dcf7 .5s reverse}@keyframes bounce-in-cdb9dcf7{0%{transform:scale(0)}50%{transform:scale(1.25)}to{transform:scale(1)}}.bg-primary-light[data-v-cdb9dcf7]{background-color:#0ff}.hover[data-v-cdb9dcf7]:bg-primary-light:hover{background-color:#7fffd4}.font-bold[data-v-cdb9dcf7]{font-weight:700}.hljs-comment,.hljs-quote{color:#7285b7}.hljs-deletion,.hljs-name,.hljs-regexp,.hljs-selector-class,.hljs-selector-id,.hljs-tag,.hljs-template-variable,.hljs-variable{color:#ff9da4}.hljs-built_in,.hljs-link,.hljs-literal,.hljs-meta,.hljs-number,.hljs-params,.hljs-type{color:#ffc58f}.hljs-attribute{color:#ffeead}.hljs-addition,.hljs-bullet,.hljs-string,.hljs-symbol{color:#d1f1a9}.hljs-section,.hljs-title{color:#bbdaff}.hljs-keyword,.hljs-selector-tag{color:#ebbbff}.hljs{background:#002451;color:#fff}pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}/*!
|
||||||
Theme: Tokyo-night-Dark
|
Theme: Tokyo-night-Dark
|
||||||
origin: https://github.com/enkia/tokyo-night-vscode-theme
|
origin: https://github.com/enkia/tokyo-night-vscode-theme
|
||||||
Description: Original highlight.js style
|
Description: Original highlight.js style
|
File diff suppressed because one or more lines are too long
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">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<title>LoLLMS WebUI - Welcome</title>
|
<title>LoLLMS WebUI - Welcome</title>
|
||||||
<script type="module" crossorigin src="/assets/index-7a2b8295.js"></script>
|
<script type="module" crossorigin src="/assets/index-8081d9dd.js"></script>
|
||||||
<link rel="stylesheet" href="/assets/index-414390ac.css">
|
<link rel="stylesheet" href="/assets/index-2aca4824.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="app"></div>
|
<div id="app"></div>
|
||||||
|
@ -604,7 +604,23 @@
|
|||||||
</button>
|
</button>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<!-- Row 3 -->
|
||||||
|
<tr>
|
||||||
|
<td style="min-width: 200px;">
|
||||||
|
<label for="user_name" class="text-sm font-bold" style="margin-right: 1rem;">User avatar:</label>
|
||||||
|
</td>
|
||||||
|
<td style="width: 100%;">
|
||||||
|
<img :src="avatar">
|
||||||
|
</td>
|
||||||
|
<td style="min-width: 300px;">
|
||||||
|
<button
|
||||||
|
class="hover:text-secondary bg-blue-100 m-2 p-2 duration-75 flex justify-center w-full hover:bg-bg-light-tone hover:dark:bg-bg-dark-tone rounded-lg"
|
||||||
|
@click="update_setting('user_name', userName)"
|
||||||
|
>
|
||||||
|
Validate
|
||||||
|
</button>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
<!-- Row 4 -->
|
<!-- Row 4 -->
|
||||||
<tr>
|
<tr>
|
||||||
<td style="min-width: 200px;">
|
<td style="min-width: 200px;">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user