mirror of
https://github.com/ParisNeo/lollms-webui.git
synced 2024-12-24 14:36:39 +00:00
upgraded web ui
This commit is contained in:
parent
d2cfdc5876
commit
2dae2cbd93
@ -1,5 +1,5 @@
|
|||||||
# =================== Lord Of Large Language Multimodal Systems Configuration file ===========================
|
# =================== Lord Of Large Language Multimodal Systems Configuration file ===========================
|
||||||
version: 74
|
version: 75
|
||||||
binding_name: null
|
binding_name: null
|
||||||
model_name: null
|
model_name: null
|
||||||
model_variant: null
|
model_variant: null
|
||||||
@ -26,8 +26,8 @@ port: 9600
|
|||||||
# Genreration parameters
|
# Genreration parameters
|
||||||
discussion_prompt_separator: "!@>"
|
discussion_prompt_separator: "!@>"
|
||||||
seed: -1
|
seed: -1
|
||||||
n_predict: 1024
|
|
||||||
ctx_size: 4084
|
ctx_size: 4084
|
||||||
|
max_n_predict: 4096
|
||||||
min_n_predict: 512
|
min_n_predict: 512
|
||||||
temperature: 0.9
|
temperature: 0.9
|
||||||
top_k: 50
|
top_k: 50
|
||||||
|
@ -43,13 +43,6 @@ def add_events(sio:socketio):
|
|||||||
ASCIIColors.yellow("New descussion requested")
|
ASCIIColors.yellow("New descussion requested")
|
||||||
client_id = sid
|
client_id = sid
|
||||||
title = data["title"]
|
title = data["title"]
|
||||||
if lollmsElfServer.session.get_client(client_id).discussion is not None:
|
|
||||||
if lollmsElfServer.long_term_memory is not None:
|
|
||||||
title, content = lollmsElfServer.session.get_client(client_id).discussion.export_for_vectorization()
|
|
||||||
skill = lollmsElfServer.learn_from_discussion(title, content)
|
|
||||||
lollmsElfServer.long_term_memory.add_document(title, skill, chunk_size=lollmsElfServer.config.data_vectorization_chunk_size, overlap_size=lollmsElfServer.config.data_vectorization_overlap_size, force_vectorize=False, add_as_a_bloc=False, add_to_index=True)
|
|
||||||
ASCIIColors.yellow("4- Saving database")
|
|
||||||
lollmsElfServer.long_term_memory.save_to_json()
|
|
||||||
lollmsElfServer.session.get_client(client_id).discussion = lollmsElfServer.db.create_discussion(title)
|
lollmsElfServer.session.get_client(client_id).discussion = lollmsElfServer.db.create_discussion(title)
|
||||||
# Get the current timestamp
|
# Get the current timestamp
|
||||||
timestamp = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
|
timestamp = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
|
||||||
|
@ -79,6 +79,57 @@ def add_events(sio:socketio):
|
|||||||
#tpe.start()
|
#tpe.start()
|
||||||
else:
|
else:
|
||||||
lollmsElfServer.error("I am busy. Come back later.", client_id=client_id)
|
lollmsElfServer.error("I am busy. Come back later.", client_id=client_id)
|
||||||
|
@sio.on('generate_msg_with_internet')
|
||||||
|
def generate_msg_with_internet(sid, data):
|
||||||
|
client_id = sid
|
||||||
|
lollmsElfServer.cancel_gen = False
|
||||||
|
client = lollmsElfServer.session.get_client(client_id)
|
||||||
|
|
||||||
|
client.generated_text=""
|
||||||
|
client.cancel_generation=False
|
||||||
|
client.continuing=False
|
||||||
|
client.first_chunk=True
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if not lollmsElfServer.model:
|
||||||
|
ASCIIColors.error("Model not selected. Please select a model")
|
||||||
|
lollmsElfServer.error("Model not selected. Please select a model", client_id=client_id)
|
||||||
|
return
|
||||||
|
|
||||||
|
if not lollmsElfServer.busy:
|
||||||
|
if lollmsElfServer.session.get_client(client_id).discussion is None:
|
||||||
|
if lollmsElfServer.db.does_last_discussion_have_messages():
|
||||||
|
lollmsElfServer.session.get_client(client_id).discussion = lollmsElfServer.db.create_discussion()
|
||||||
|
else:
|
||||||
|
lollmsElfServer.session.get_client(client_id).discussion = lollmsElfServer.db.load_last_discussion()
|
||||||
|
|
||||||
|
prompt = data["prompt"]
|
||||||
|
ump = lollmsElfServer.config.discussion_prompt_separator +lollmsElfServer.config.user_name.strip() if lollmsElfServer.config.use_user_name_in_discussions else lollmsElfServer.personality.user_message_prefix
|
||||||
|
message = lollmsElfServer.session.get_client(client_id).discussion.add_message(
|
||||||
|
message_type = MSG_TYPE.MSG_TYPE_FULL.value,
|
||||||
|
sender_type = SENDER_TYPES.SENDER_TYPES_USER.value,
|
||||||
|
sender = ump.replace(lollmsElfServer.config.discussion_prompt_separator,"").replace(":",""),
|
||||||
|
content=prompt,
|
||||||
|
metadata=None,
|
||||||
|
parent_message_id=lollmsElfServer.message_id
|
||||||
|
)
|
||||||
|
|
||||||
|
ASCIIColors.green("Starting message generation by "+lollmsElfServer.personality.name)
|
||||||
|
|
||||||
|
client.generation_thread = threading.Thread(target=lollmsElfServer.start_message_generation, args=(message, message.id, client_id, False, None, True))
|
||||||
|
client.generation_thread.start()
|
||||||
|
|
||||||
|
# lollmsElfServer.sio.sleep(0.01)
|
||||||
|
ASCIIColors.info("Started generation task")
|
||||||
|
lollmsElfServer.busy=True
|
||||||
|
#tpe = threading.Thread(target=lollmsElfServer.start_message_generation, args=(message, message_id, client_id))
|
||||||
|
#tpe.start()
|
||||||
|
else:
|
||||||
|
lollmsElfServer.error("I am busy. Come back later.", client_id=client_id)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@sio.on('generate_msg_from')
|
@sio.on('generate_msg_from')
|
||||||
def handle_generate_msg_from(sid, data):
|
def handle_generate_msg_from(sid, data):
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit 89102b9c016786873b3863e39673659611fe7770
|
Subproject commit e25e84ae31fdd589b349d23fc8e073d22a2d8043
|
@ -1085,7 +1085,7 @@ class LOLLMSWebUI(LOLLMSElfServer):
|
|||||||
output = ""
|
output = ""
|
||||||
return output
|
return output
|
||||||
|
|
||||||
def start_message_generation(self, message, message_id, client_id, is_continue=False, generation_type=None):
|
def start_message_generation(self, message, message_id, client_id, is_continue=False, generation_type=None, force_using_internet=False):
|
||||||
client = self.session.get_client(client_id)
|
client = self.session.get_client(client_id)
|
||||||
if self.personality is None:
|
if self.personality is None:
|
||||||
self.warning("Select a personality")
|
self.warning("Select a personality")
|
||||||
@ -1107,7 +1107,7 @@ class LOLLMSWebUI(LOLLMSElfServer):
|
|||||||
self.update_message(client_id, "✍ warming up ...", msg_type=MSG_TYPE.MSG_TYPE_STEP_START)
|
self.update_message(client_id, "✍ warming up ...", msg_type=MSG_TYPE.MSG_TYPE_STEP_START)
|
||||||
|
|
||||||
# prepare query and reception
|
# prepare query and reception
|
||||||
self.discussion_messages, self.current_message, tokens, context_details, internet_search_infos = self.prepare_query(client_id, message_id, is_continue, n_tokens=self.config.min_n_predict, generation_type=generation_type)
|
self.discussion_messages, self.current_message, tokens, context_details, internet_search_infos = self.prepare_query(client_id, message_id, is_continue, n_tokens=self.config.min_n_predict, generation_type=generation_type, force_using_internet=force_using_internet)
|
||||||
self.prepare_reception(client_id)
|
self.prepare_reception(client_id)
|
||||||
self.generating = True
|
self.generating = True
|
||||||
client.processing=True
|
client.processing=True
|
||||||
|
4
web/dist/assets/active-80ac3366.svg
vendored
Normal file
4
web/dist/assets/active-80ac3366.svg
vendored
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<circle cx="50" cy="50" r="40" stroke="green" stroke-width="4" fill="green" />
|
||||||
|
<path stroke="white" stroke-width="4" d="M40 50 l10 10 20 -20" fill="none" />
|
||||||
|
</svg>
|
After Width: | Height: | Size: 233 B |
5
web/dist/assets/inactive-36ac9976.svg
vendored
Normal file
5
web/dist/assets/inactive-36ac9976.svg
vendored
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<circle cx="50" cy="50" r="40" stroke="red" stroke-width="4" fill="red" />
|
||||||
|
<line x1="35" y1="35" x2="65" y2="65" stroke="white" stroke-width="4" />
|
||||||
|
<line x1="65" y1="35" x2="35" y2="65" stroke="white" stroke-width="4" />
|
||||||
|
</svg>
|
After Width: | Height: | Size: 300 B |
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
12
web/dist/assets/send_globe-775ba9b7.svg
vendored
Normal file
12
web/dist/assets/send_globe-775ba9b7.svg
vendored
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="256" height="256" viewBox="0 0 256 256" xml:space="preserve">
|
||||||
|
|
||||||
|
<defs>
|
||||||
|
</defs>
|
||||||
|
<g style="stroke: none; stroke-width: 0; stroke-dasharray: none; stroke-linecap: butt; stroke-linejoin: miter; stroke-miterlimit: 10; fill: none; fill-rule: nonzero; opacity: 1;" transform="translate(1.4065934065934016 1.4065934065934016) scale(2.81 2.81)" >
|
||||||
|
<path d="M 89.999 3.075 C 90 3.02 90 2.967 89.999 2.912 c -0.004 -0.134 -0.017 -0.266 -0.038 -0.398 c -0.007 -0.041 -0.009 -0.081 -0.018 -0.122 c -0.034 -0.165 -0.082 -0.327 -0.144 -0.484 c -0.018 -0.046 -0.041 -0.089 -0.061 -0.134 c -0.053 -0.119 -0.113 -0.234 -0.182 -0.346 C 89.528 1.382 89.5 1.336 89.469 1.29 c -0.102 -0.147 -0.212 -0.288 -0.341 -0.417 c -0.13 -0.13 -0.273 -0.241 -0.421 -0.344 c -0.042 -0.029 -0.085 -0.056 -0.129 -0.082 c -0.118 -0.073 -0.239 -0.136 -0.364 -0.191 c -0.039 -0.017 -0.076 -0.037 -0.116 -0.053 c -0.161 -0.063 -0.327 -0.113 -0.497 -0.147 c -0.031 -0.006 -0.063 -0.008 -0.094 -0.014 c -0.142 -0.024 -0.285 -0.038 -0.429 -0.041 C 87.03 0 86.983 0 86.936 0.001 c -0.141 0.003 -0.282 0.017 -0.423 0.041 c -0.035 0.006 -0.069 0.008 -0.104 0.015 c -0.154 0.031 -0.306 0.073 -0.456 0.129 L 1.946 31.709 c -1.124 0.422 -1.888 1.473 -1.943 2.673 c -0.054 1.199 0.612 2.316 1.693 2.838 l 34.455 16.628 l 16.627 34.455 C 53.281 89.344 54.334 90 55.481 90 c 0.046 0 0.091 -0.001 0.137 -0.003 c 1.199 -0.055 2.251 -0.819 2.673 -1.943 L 89.815 4.048 c 0.056 -0.149 0.097 -0.3 0.128 -0.453 c 0.008 -0.041 0.011 -0.081 0.017 -0.122 C 89.982 3.341 89.995 3.208 89.999 3.075 z M 75.086 10.672 L 37.785 47.973 L 10.619 34.864 L 75.086 10.672 z M 55.136 79.381 L 42.027 52.216 l 37.302 -37.302 L 55.136 79.381 z" style="stroke: none; stroke-width: 1; stroke-dasharray: none; stroke-linecap: butt; stroke-linejoin: miter; stroke-miterlimit: 10; fill: rgb(0,0,0); fill-rule: nonzero; opacity: 1;" transform=" matrix(1 0 0 1 0 0) " stroke-linecap="round" />
|
||||||
|
|
||||||
|
<circle cx="75" cy="75" r="15" fill="#008000"/>
|
||||||
|
<path d="M75,60 A15,15 0 0,1 90,75 A15,15 0 0,1 75,90 A15,15 0 0,1 60,75 A15,15 0 0,1 75,60 Z" stroke="#FFFFFF" stroke-width="2" fill="none"/>
|
||||||
|
<path d="M81,75 A6,6 0 0,1 75,81 A6,6 0 0,1 69,75 A6,6 0 0,1 75,69 A6,6 0 0,1 81,75 Z" fill="#FFFFFF"/>
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 2.3 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">
|
<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-239fa098.js"></script>
|
<script type="module" crossorigin src="/assets/index-97c65ac7.js"></script>
|
||||||
<link rel="stylesheet" href="/assets/index-3871bd66.css">
|
<link rel="stylesheet" href="/assets/index-d152d392.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="app"></div>
|
<div id="app"></div>
|
||||||
|
@ -195,16 +195,6 @@
|
|||||||
ref="personalityCMD"
|
ref="personalityCMD"
|
||||||
></PersonalitiesCommands>
|
></PersonalitiesCommands>
|
||||||
</div>
|
</div>
|
||||||
<div class="group relative w-12">
|
|
||||||
<button @click.prevent="toggleSwitch">
|
|
||||||
<svg width="100" height="50">
|
|
||||||
<rect x="10" y="15" width="40" height="20" rx="12" ry="12" :fill="config.activate_internet_search ? 'green' : 'red'" />
|
|
||||||
<circle cx="20" cy="25" r="7" :visibility="config.activate_internet_search ? 'hidden' : 'visible'" />
|
|
||||||
<circle cx="38" cy="25" r="7" :visibility="config.activate_internet_search ? 'visible' : 'hidden'" />
|
|
||||||
</svg>
|
|
||||||
</button>
|
|
||||||
<div class="pointer-events-none absolute -top-20 left-1/2 w-max -translate-x-1/2 rounded-md bg-gray-100 p-2 opacity-0 transition-opacity group-hover:opacity-100 dark:bg-gray-800"><p class="max-w-sm text-sm text-gray-800 dark:text-gray-200">When enabled, the model will try to complement its answer with information queried from the web.</p></div>
|
|
||||||
</div>
|
|
||||||
<div class="relative grow">
|
<div class="relative grow">
|
||||||
<textarea id="chat" rows="1" v-model="message" title="Hold SHIFT + ENTER to add new line"
|
<textarea id="chat" rows="1" v-model="message" title="Hold SHIFT + ENTER to add new line"
|
||||||
class="inline-block no-scrollbar p-2.5 w-full text-sm text-gray-900 bg-bg-light rounded-lg border border-gray-300 focus:ring-blue-500 focus:border-blue-500 dark:bg-bg-dark dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"
|
class="inline-block no-scrollbar p-2.5 w-full text-sm text-gray-900 bg-bg-light rounded-lg border border-gray-300 focus:ring-blue-500 focus:border-blue-500 dark:bg-bg-dark dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"
|
||||||
@ -224,6 +214,13 @@
|
|||||||
</button>
|
</button>
|
||||||
<div class="pointer-events-none absolute -top-20 left-1/2 w-max -translate-x-1/2 rounded-md bg-gray-100 p-2 opacity-0 transition-opacity group-hover:opacity-100 dark:bg-gray-800"><p class="max-w-sm text-sm text-gray-800 dark:text-gray-200">Sends your message to the AI.</p></div>
|
<div class="pointer-events-none absolute -top-20 left-1/2 w-max -translate-x-1/2 rounded-md bg-gray-100 p-2 opacity-0 transition-opacity group-hover:opacity-100 dark:bg-gray-800"><p class="max-w-sm text-sm text-gray-800 dark:text-gray-200">Sends your message to the AI.</p></div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="group relative w-max">
|
||||||
|
<button v-if="!loading" type="button" @click="submitWithInternetSearch" title="Send With internet"
|
||||||
|
class="w-6 hover:text-secondary duration-75 active:scale-90 cursor-pointer transform transition-transform hover:translate-y-[-5px] active:scale-90">
|
||||||
|
<img :src="sendGlobe" width="50" height="50">
|
||||||
|
</button>
|
||||||
|
<div class="pointer-events-none absolute -top-20 left-1/2 w-max -translate-x-1/2 rounded-md bg-gray-100 p-2 opacity-0 transition-opacity group-hover:opacity-100 dark:bg-gray-800"><p class="max-w-sm text-sm text-gray-800 dark:text-gray-200">Sends your message to the AI with internet search.</p></div>
|
||||||
|
</div>
|
||||||
<div class="group relative w-max">
|
<div class="group relative w-max">
|
||||||
<button v-if="!loading"
|
<button v-if="!loading"
|
||||||
type="button"
|
type="button"
|
||||||
@ -329,7 +326,7 @@ import PersonalitiesCommands from '@/components/PersonalitiesCommands.vue';
|
|||||||
import socket from '@/services/websocket.js'
|
import socket from '@/services/websocket.js'
|
||||||
import UniversalForm from '@/components/UniversalForm.vue';
|
import UniversalForm from '@/components/UniversalForm.vue';
|
||||||
import modelImgPlaceholder from "../assets/default_model.png"
|
import modelImgPlaceholder from "../assets/default_model.png"
|
||||||
|
import sendGlobe from "../assets/send_globe.svg"
|
||||||
import loader_v0 from "../assets/loader_v0.svg"
|
import loader_v0 from "../assets/loader_v0.svg"
|
||||||
|
|
||||||
console.log("modelImgPlaceholder:",modelImgPlaceholder)
|
console.log("modelImgPlaceholder:",modelImgPlaceholder)
|
||||||
@ -360,6 +357,7 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
loader_v0:loader_v0,
|
loader_v0:loader_v0,
|
||||||
|
sendGlobe:sendGlobe,
|
||||||
modelImgPlaceholder:modelImgPlaceholder,
|
modelImgPlaceholder:modelImgPlaceholder,
|
||||||
bUrl:bUrl,
|
bUrl:bUrl,
|
||||||
message: "",
|
message: "",
|
||||||
@ -809,8 +807,8 @@ export default {
|
|||||||
|
|
||||||
console.log(this.filesList)
|
console.log(this.filesList)
|
||||||
},
|
},
|
||||||
sendMessageEvent(msg) {
|
sendMessageEvent(msg, type="no_internet") {
|
||||||
this.$emit('messageSentEvent', msg)
|
this.$emit('messageSentEvent', msg, type)
|
||||||
|
|
||||||
},
|
},
|
||||||
sendCMDEvent(cmd){
|
sendCMDEvent(cmd){
|
||||||
@ -874,6 +872,13 @@ export default {
|
|||||||
this.message = ""
|
this.message = ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
submitWithInternetSearch(){
|
||||||
|
if (this.message) {
|
||||||
|
this.sendMessageEvent(this.message, "internet")
|
||||||
|
this.message = ""
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
stopGenerating() {
|
stopGenerating() {
|
||||||
this.$emit('stopGenerating')
|
this.$emit('stopGenerating')
|
||||||
|
@ -95,6 +95,13 @@
|
|||||||
:class="{ 'text-5xl': editMsgMode }">
|
:class="{ 'text-5xl': editMsgMode }">
|
||||||
<i data-feather="send"></i>
|
<i data-feather="send"></i>
|
||||||
</div>
|
</div>
|
||||||
|
<div v-if="!editMsgMode && message.sender!=this.$store.state.mountedPers.name" class="text-lg hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer"
|
||||||
|
title="Resend message without the full context"
|
||||||
|
@click.stop="resendMessage('full_context_with_internet')"
|
||||||
|
:class="{ 'text-5xl': editMsgMode }">
|
||||||
|
<img :src="sendGlobe" width="25" height="25">
|
||||||
|
</div>
|
||||||
|
|
||||||
<div v-if="!editMsgMode && message.sender!=this.$store.state.mountedPers.name" class="text-lg hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer"
|
<div v-if="!editMsgMode && message.sender!=this.$store.state.mountedPers.name" class="text-lg hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer"
|
||||||
title="Resend message without the full context"
|
title="Resend message without the full context"
|
||||||
@click.stop="resendMessage('simple_question')"
|
@click.stop="resendMessage('simple_question')"
|
||||||
@ -277,7 +284,7 @@ import ok_svg from '@/assets/ok.svg';
|
|||||||
import failed_svg from '@/assets/failed.svg';
|
import failed_svg from '@/assets/failed.svg';
|
||||||
|
|
||||||
import loading_svg from '@/assets/loading.svg';
|
import loading_svg from '@/assets/loading.svg';
|
||||||
|
import sendGlobe from "../assets/send_globe.svg"
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
// eslint-disable-next-line vue/multi-word-component-names
|
// eslint-disable-next-line vue/multi-word-component-names
|
||||||
@ -313,6 +320,7 @@ export default {
|
|||||||
ok_svg:ok_svg,
|
ok_svg:ok_svg,
|
||||||
failed_svg:failed_svg,
|
failed_svg:failed_svg,
|
||||||
loading_svg:loading_svg,
|
loading_svg:loading_svg,
|
||||||
|
sendGlobe:sendGlobe,
|
||||||
code_block:code_block,
|
code_block:code_block,
|
||||||
python_block:python_block,
|
python_block:python_block,
|
||||||
bash_block:bash_block,
|
bash_block:bash_block,
|
||||||
|
@ -98,6 +98,14 @@
|
|||||||
class=" w-6 text-blue-400 hover:text-secondary duration-75 active:scale-90">
|
class=" w-6 text-blue-400 hover:text-secondary duration-75 active:scale-90">
|
||||||
<img :src="memory_icon">
|
<img :src="memory_icon">
|
||||||
</button>
|
</button>
|
||||||
|
<button v-if="!loading && $store.state.config.activate_skills_lib" type="button" @click.stop="toggleSkillsLib" title="Skills database is activated"
|
||||||
|
class=" w-6 text-blue-400 hover:text-secondary duration-75 active:scale-90">
|
||||||
|
<img :src="active_skills">
|
||||||
|
</button>
|
||||||
|
<button v-if="!loading && !$store.state.config.activate_skills_lib" type="button" @click.stop="toggleSkillsLib" title="Skills database is deactivated"
|
||||||
|
class=" w-6 text-blue-400 hover:text-secondary duration-75 active:scale-90">
|
||||||
|
<img :src="inactive_skills">
|
||||||
|
</button>
|
||||||
|
|
||||||
<div v-if="loading" title="Loading.." class="flex flex-row flex-grow justify-end">
|
<div v-if="loading" title="Loading.." class="flex flex-row flex-grow justify-end">
|
||||||
<!-- SPINNER -->
|
<!-- SPINNER -->
|
||||||
@ -367,7 +375,8 @@ import SVGRedBrain from '@/assets/brain_red.svg';
|
|||||||
import SVGOrangeBrain from '@/assets/brain_orange.svg';
|
import SVGOrangeBrain from '@/assets/brain_orange.svg';
|
||||||
import SVGGreenBrain from '@/assets/brain_green.svg';
|
import SVGGreenBrain from '@/assets/brain_green.svg';
|
||||||
import memory_icon from "../assets/memory_icon.svg"
|
import memory_icon from "../assets/memory_icon.svg"
|
||||||
|
import active_skills from "../assets/active.svg"
|
||||||
|
import inactive_skills from "../assets/inactive.svg"
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|
||||||
@ -376,6 +385,8 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
memory_icon: memory_icon,
|
memory_icon: memory_icon,
|
||||||
|
active_skills:active_skills,
|
||||||
|
inactive_skills:inactive_skills,
|
||||||
posts_headers : {
|
posts_headers : {
|
||||||
'accept': 'application/json',
|
'accept': 'application/json',
|
||||||
'Content-Type': 'application/json'
|
'Content-Type': 'application/json'
|
||||||
@ -554,7 +565,7 @@ export default {
|
|||||||
console.log("done")
|
console.log("done")
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async toggleLTM(){
|
async toggleSkillsLib(){
|
||||||
this.$store.state.config.activate_skills_lib =! this.$store.state.config.activate_skills_lib;
|
this.$store.state.config.activate_skills_lib =! this.$store.state.config.activate_skills_lib;
|
||||||
await this.applyConfiguration();
|
await this.applyConfiguration();
|
||||||
socket.emit('upgrade_vectorization');
|
socket.emit('upgrade_vectorization');
|
||||||
@ -1183,7 +1194,7 @@ export default {
|
|||||||
createEmptyAIMessage(){
|
createEmptyAIMessage(){
|
||||||
socket.emit('create_empty_message', {"type":1}); // 0 for user and 1 for AI
|
socket.emit('create_empty_message', {"type":1}); // 0 for user and 1 for AI
|
||||||
},
|
},
|
||||||
sendMsg(msg) {
|
sendMsg(msg,type) {
|
||||||
// Sends message to binding
|
// Sends message to binding
|
||||||
if (!msg) {
|
if (!msg) {
|
||||||
this.$store.state.toast.showToast("Message contains no content!", 4, false)
|
this.$store.state.toast.showToast("Message contains no content!", 4, false)
|
||||||
@ -1195,7 +1206,12 @@ export default {
|
|||||||
if (res) {
|
if (res) {
|
||||||
//console.log(res.data.status);
|
//console.log(res.data.status);
|
||||||
if (!res.data.status) {
|
if (!res.data.status) {
|
||||||
socket.emit('generate_msg', { prompt: msg });
|
if(type=="internet"){
|
||||||
|
socket.emit('generate_msg_with_internet', { prompt: msg });
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
socket.emit('generate_msg', { prompt: msg });
|
||||||
|
}
|
||||||
|
|
||||||
// Create new User message
|
// Create new User message
|
||||||
// Temp data
|
// Temp data
|
||||||
|
@ -487,6 +487,21 @@
|
|||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="min-width: 200px;">
|
||||||
|
<label for="max_n_predict" class="text-sm font-bold" style="margin-right: 1rem;">Maximum number of output tokens space (forces the model to have more space to speak):</label>
|
||||||
|
</td>
|
||||||
|
<td style="width: 100%;">
|
||||||
|
<input
|
||||||
|
type="number"
|
||||||
|
id="max_n_predict"
|
||||||
|
required
|
||||||
|
v-model="configFile.min_n_predict"
|
||||||
|
@change="settingsChanged=true"
|
||||||
|
class="mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"
|
||||||
|
>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td style="min-width: 200px;">
|
<td style="min-width: 200px;">
|
||||||
<label for="min_n_predict" class="text-sm font-bold" style="margin-right: 1rem;">Minimum number of output tokens space (forces the model to have more space to speak):</label>
|
<label for="min_n_predict" class="text-sm font-bold" style="margin-right: 1rem;">Minimum number of output tokens space (forces the model to have more space to speak):</label>
|
||||||
@ -540,6 +555,42 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</Card>
|
</Card>
|
||||||
|
<Card title="Knowledge database" :is_subcard="true" class="pb-2 m-2">
|
||||||
|
<table class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500">
|
||||||
|
<tr>
|
||||||
|
<td style="min-width: 200px;">
|
||||||
|
<label for="activate_skills_lib" class="text-sm font-bold" style="margin-right: 1rem;">Activate Skills library:</label>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<div class="flex flex-row">
|
||||||
|
<input
|
||||||
|
type="checkbox"
|
||||||
|
id="activate_skills_lib"
|
||||||
|
required
|
||||||
|
v-model="configFile.activate_skills_lib"
|
||||||
|
@change="settingsChanged=true"
|
||||||
|
class="mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="min-width: 200px;">
|
||||||
|
<label for="discussion_db_name" class="text-sm font-bold" style="margin-right: 1rem;">Skills library database name:</label>
|
||||||
|
</td>
|
||||||
|
<td style="width: 100%;">
|
||||||
|
<input
|
||||||
|
type="text"
|
||||||
|
id="skills_lib_database_name"
|
||||||
|
required
|
||||||
|
v-model="configFile.skills_lib_database_name"
|
||||||
|
@change="settingsChanged=true"
|
||||||
|
class="w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"
|
||||||
|
>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</Card>
|
||||||
<Card title="Data Vectorization" :is_subcard="true" class="pb-2 m-2">
|
<Card title="Data Vectorization" :is_subcard="true" class="pb-2 m-2">
|
||||||
<table class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500">
|
<table class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500">
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit 81005b985da5ca57278b24b4e76eddb32227b4d3
|
Subproject commit 6375917fdfa3750a5a93a9aaea6b926107a15cf8
|
Loading…
Reference in New Issue
Block a user