mirror of
https://github.com/ParisNeo/lollms-webui.git
synced 2024-12-18 20:17:50 +00:00
upgraded
This commit is contained in:
parent
b3d19b808c
commit
261d2639ff
@ -1 +1 @@
|
||||
Subproject commit be44717d9eac241163b8951c758e4c5e739af199
|
||||
Subproject commit a4c1bed01e3f94987026fb5c6f853215fc5a37fa
|
@ -861,8 +861,8 @@ class LOLLMSWebUI(LOLLMSElfServer):
|
||||
# Calculate the available space for the messages
|
||||
available_space = self.config.ctx_size - n_tokens - total_tokens
|
||||
|
||||
if self.config.debug:
|
||||
self.info(f"Tokens summary:\nConditionning:{n_cond_tk}\nn_isearch_tk:{n_isearch_tk}\ndoc:{n_doc_tk}\nhistory:{n_history_tk}\nuser description:{n_user_description_tk}\nAvailable space:{available_space}",10)
|
||||
# if self.config.debug:
|
||||
# self.info(f"Tokens summary:\nConditionning:{n_cond_tk}\nn_isearch_tk:{n_isearch_tk}\ndoc:{n_doc_tk}\nhistory:{n_history_tk}\nuser description:{n_user_description_tk}\nAvailable space:{available_space}",10)
|
||||
|
||||
# Raise an error if the available space is 0 or less
|
||||
if available_space<1:
|
||||
@ -957,7 +957,7 @@ class LOLLMSWebUI(LOLLMSElfServer):
|
||||
ASCIIColors.info(f"prompt size:{len(tokens)} tokens")
|
||||
ASCIIColors.info(f"available space after doc and knowledge:{available_space} tokens")
|
||||
|
||||
self.info(f"Tokens summary:\nPrompt size:{len(tokens)}\nTo generate:{available_space}",10)
|
||||
# self.info(f"Tokens summary:\nPrompt size:{len(tokens)}\nTo generate:{available_space}",10)
|
||||
|
||||
# Details
|
||||
context_details = {
|
||||
|
8
web/dist/assets/index-0145fd98.css
vendored
Normal file
8
web/dist/assets/index-0145fd98.css
vendored
Normal file
File diff suppressed because one or more lines are too long
8
web/dist/assets/index-4c3fd048.css
vendored
8
web/dist/assets/index-4c3fd048.css
vendored
File diff suppressed because one or more lines are too long
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">
|
||||
<title>LoLLMS WebUI - Welcome</title>
|
||||
<script type="module" crossorigin src="/assets/index-a227e0a5.js"></script>
|
||||
<link rel="stylesheet" href="/assets/index-4c3fd048.css">
|
||||
<script type="module" crossorigin src="/assets/index-88872052.js"></script>
|
||||
<link rel="stylesheet" href="/assets/index-0145fd98.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
|
@ -12,11 +12,6 @@
|
||||
<i data-feather="list"></i>
|
||||
</button>
|
||||
</div>
|
||||
<button v-if="loading" type="button"
|
||||
class="bg-red-500 dark:bg-red-800 hover:bg-red-600 focus:ring-4 focus:ring-blue-300 font-medium rounded-lg text-sm px-5 py-2.5 mr-2 mb-2 dark:hover:bg-bg-dark-tone focus:outline-none dark:focus:ring-blue-800"
|
||||
@click.stop="stopGenerating">
|
||||
Stop generating
|
||||
</button>
|
||||
<!-- FILES -->
|
||||
<div v-if="filesList.length > 0 && showfilesList ==true">
|
||||
<div class="flex flex-col max-h-64 ">
|
||||
@ -216,6 +211,11 @@
|
||||
</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>
|
||||
<button v-if="loading" type="button"
|
||||
class="bg-red-500 dark:bg-red-800 hover:bg-red-600 focus:ring-4 focus:ring-blue-300 font-medium rounded-lg text-sm px-5 py-2.5 mr-2 mb-2 dark:hover:bg-bg-dark-tone focus:outline-none dark:focus:ring-blue-800"
|
||||
@click.stop="stopGenerating">
|
||||
Stop generating
|
||||
</button>
|
||||
|
||||
<div class="group relative w-max">
|
||||
<button v-if="!loading" type="button" @click="submit" title="Send"
|
||||
|
@ -1,8 +1,7 @@
|
||||
<template>
|
||||
<div v-if="show" class="fixed top-50 left-0 right-0 bottom-50 flex items-center justify-center bg-black bg-opacity-50 z-20">
|
||||
<div class="relative w-full max-h-full ">
|
||||
<button type="button" @click="hide()"
|
||||
class="absolute top-3 right-2.5 text-gray-400 bg-transparent hover:bg-gray-200 hover:text-gray-900 rounded-lg text-sm p-1.5 ml-auto inline-flex items-center dark:hover:bg-gray-800 dark:hover:text-white">
|
||||
<div v-if="show" class="fixed top-0 left-0 right-0 bottom-0 flex items-center justify-center bg-black bg-opacity-50 z-20">
|
||||
<button type="button" @click="hide()"
|
||||
class="absolute top-1 right-2.5 text-gray-400 bg-transparent hover:bg-gray-200 hover:text-gray-900 rounded-lg text-sm p-1.5 ml-auto inline-flex items-center dark:hover:bg-gray-800 dark:hover:text-white">
|
||||
<svg aria-hidden="true" class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20"
|
||||
xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd"
|
||||
@ -11,8 +10,9 @@
|
||||
</svg>
|
||||
<span class="sr-only">Close modal</span>
|
||||
</button>
|
||||
<div class="relative w-full max-h-full ">
|
||||
<form class="mb-4">
|
||||
<div class="container relative bg-white rounded-lg shadow dark:bg-gray-700 overflow-y-scroll">
|
||||
<div class="container relative bg-white rounded-lg shadow dark:bg-gray-700" style="height:500px; overflow-y: auto;">
|
||||
<table class="w-full">
|
||||
<tr>
|
||||
<td><label for="personalityConditioning">Personality Conditioning:</label></td><td><textarea id="personalityConditioning" class="w-full" v-model="config.personality_conditioning"></textarea></td>
|
||||
@ -73,17 +73,17 @@
|
||||
<td><label for="antiPrompts">Anti Prompts:</label></td>
|
||||
<td><textarea id="antiPrompts" class="w-full" v-model="config.anti_prompts"></textarea></td>
|
||||
</tr>
|
||||
</table>
|
||||
</table>
|
||||
</div>
|
||||
<div class="flex flex-row">
|
||||
<button type="submit" @click.prevent="submitForm" class="bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded">
|
||||
Commit AI to Server
|
||||
</button>
|
||||
<button @click.prevent="hide()" class="bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded">
|
||||
Close
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
<div class="flex flex-row mt-4">
|
||||
<button type="submit" @click.prevent="submitForm" class="bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded">
|
||||
Commit AI to Server
|
||||
</button>
|
||||
<button @click.prevent="hide()" class="bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded">
|
||||
Close
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -114,6 +114,7 @@ export default {
|
||||
onMount: Function,
|
||||
onUnMount: Function,
|
||||
onRemount: Function,
|
||||
onCopyToCustom: Function,
|
||||
onEdit: Function,
|
||||
onReinstall: Function,
|
||||
onSettings: Function,
|
||||
@ -138,6 +139,9 @@ export default {
|
||||
if(this.personality.category=="custom_personalities"){
|
||||
main_menu.push({name:"edit", icon: "feather:settings", is_file:false, value:this.edit})
|
||||
}
|
||||
else{
|
||||
main_menu.push({name:"Copy to custom personas folder for editing", icon: "feather:copy", is_file:false, value:this.copyToCustom})
|
||||
}
|
||||
if(this.isMounted){
|
||||
main_menu.push({name:"remount", icon: "feather:refresh-ccw", is_file:false, value:this.reMount})
|
||||
}
|
||||
@ -182,6 +186,9 @@ export default {
|
||||
edit(){
|
||||
this.onEdit(this)
|
||||
},
|
||||
copyToCustom(){
|
||||
this.onCopyToCustom(this)
|
||||
},
|
||||
reMount(){
|
||||
this.onRemount(this)
|
||||
},
|
||||
|
@ -1976,6 +1976,7 @@
|
||||
:on-un-mount="unmountPersonality"
|
||||
:on-remount="remountPersonality"
|
||||
:on-edit="editPersonality"
|
||||
:on-copy-to-custom="copyToCustom"
|
||||
:on-reinstall="onPersonalityReinstall"
|
||||
:on-settings="onSettingsPersonality"
|
||||
:on-copy-personality-name="onCopyPersonalityName"
|
||||
@ -4394,6 +4395,28 @@ export default {
|
||||
console.error(error);
|
||||
});
|
||||
},
|
||||
copyToCustom(pers) {
|
||||
pers=pers.personality;
|
||||
// Make a POST request to the '/get_personality_config' endpoint using Axios
|
||||
axios.post('/copy_to_custom_personas', {
|
||||
category: pers.category,
|
||||
name: pers.folder,
|
||||
})
|
||||
.then(response => {
|
||||
if (response.status){
|
||||
this.$store.state.messageBox.showMessage("Personality copied to the custom personalities folder :\n")
|
||||
this.$store.dispatch('refreshPersonalitiesZoo')
|
||||
}
|
||||
else{
|
||||
this.$store.state.toast.showToast("Personality couldn't be copied to the custom personalities folder:\n", 4, false)
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
// Handle the error
|
||||
this.$store.state.toast.showToast("Personality couldn't be copied to the custom personalities folder:\n", 4, false)
|
||||
console.error(error);
|
||||
});
|
||||
},
|
||||
async remountPersonality(pers){
|
||||
await this.unmountPersonality(pers);
|
||||
await this.mountPersonality(pers);
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 287b221a01e2d79ca7977728752767a7141f76cc
|
||||
Subproject commit b0c95351f4f0f050dcf5753fa378c304aa034d53
|
@ -1 +1 @@
|
||||
Subproject commit 690e574b61cfe4f697540634cba51c053e056910
|
||||
Subproject commit 27c0639df426ceec74b140876aa1e3f4700bd9b9
|
Loading…
Reference in New Issue
Block a user