This commit is contained in:
Saifeddine ALOUI 2025-02-16 02:08:41 +01:00
parent c107b8a9fd
commit a2f5630b50
14 changed files with 147 additions and 127 deletions

View File

@ -360,6 +360,8 @@ thinking_prompt: "Use a think first process to answer the user:
mounted_function_calls: [] mounted_function_calls: []
# { name: the function name, # { name: the function name,
# author: the author of the function
# category: the category of the function
# value: the function name without spaces, # value: the function name without spaces,
# selected: selected or not, # selected: selected or not,
# icon: the icon in form feather:icon name or img:url or b64:base64, # icon: the icon in form feather:icon name or img:url or b64:base64,

@ -1 +1 @@
Subproject commit 3b377449e291902b4104d67b7380871f8b68e272 Subproject commit b5092844600cacb6c0e8fd724463ae56190e3687

View File

@ -78,7 +78,7 @@ def terminate_thread(thread):
lollms_webui_version = { lollms_webui_version = {
"version_main":18, "version_main":18,
"version_secondary":0, "version_secondary":0,
"version_type":"beta", "version_type":"",
"version_codename":"Matrix 💊" "version_codename":"Matrix 💊"
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

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
View File

@ -6,8 +6,8 @@
<script src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-svg.js"></script> <script src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-svg.js"></script>
<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</title> <title>LoLLMS WebUI</title>
<script type="module" crossorigin src="/assets/index-DibwhpMS.js"></script> <script type="module" crossorigin src="/assets/index-DuP48K9W.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-heBS-Rej.css"> <link rel="stylesheet" crossorigin href="/assets/index-PJ0LfNP6.css">
</head> </head>
<body> <body>
<div id="app"></div> <div id="app"></div>

View File

@ -564,21 +564,22 @@ export default {
return formattedDataSources; return formattedDataSources;
}, },
functionCalls(){ functionCalls(){
console.log("", this.$store.state.config.function_calls); console.log("Function calls", this.$store.state.config.mounted_function_calls);
// Extract the names from the combined array and transform them into the desired format // Extract the names from the combined array and transform them into the desired format
const formattedDataSources = this.$store.state.config.function_calls.map(functionCall => { const formattedFunctionCalls = this.$store.state.config.mounted_function_calls.map(functionCall => {
console.log("entry", functionCall); console.log("entry", functionCall);
return { return {
name: functionCall.name, name: functionCall.name,
value: functionCall.value || 'default_value', value: functionCall,
dir: functionCall.dir,
is_checked: functionCall.selected, is_checked: functionCall.selected,
icon: functionCall.icon, icon: functionCall.icon,
help: functionCall.help help: functionCall.help
}; };
}); });
console.log("formatted datalake", formattedDataSources); console.log("formatted function calls", formattedFunctionCalls);
return formattedDataSources; return formattedFunctionCalls;
} }
}, },
@ -829,10 +830,14 @@ export default {
console.log("Refreshed") console.log("Refreshed")
}, },
async toggleFunctionCall(cmd){ async toggleFunctionCall(func){
console.log("function call:") console.log("function call:")
console.log(cmd) console.log(func)
await axios.post('/toggle_mount_rag_database', {"client_id":this.$store.state.client_id,"datalake_name":cmd}) await axios.post('/toggle_function_call', {
client_id: this.$store.state.client_id,
name: func.name,
dir: func.dir
})
await this.$store.dispatch('refreshConfig'); await this.$store.dispatch('refreshConfig');
console.log("Refreshed") console.log("Refreshed")

View File

@ -74,7 +74,7 @@
import { nextTick } from "vue"; import { nextTick } from "vue";
import feather from "feather-icons"; import feather from "feather-icons";
import { marked } from "marked"; // Correct import for marked import { marked } from "marked"; // Correct import for marked
import botImgPlaceholder from "../assets/logo.svg"; import botImgPlaceholder from "../assets/logo.png";
import userImgPlaceholder from "../assets/default_user.svg"; import userImgPlaceholder from "../assets/default_user.svg";
import InteractiveMenu from "@/components/InteractiveMenu.vue"; import InteractiveMenu from "@/components/InteractiveMenu.vue";

View File

@ -2759,6 +2759,7 @@ export default {
scrollBottom(el) { scrollBottom(el) {
if (el) { if (el) {
console.log("Scrolling to bottom")
el.scrollTo( el.scrollTo(
{ {
top: el.scrollHeight, top: el.scrollHeight,
@ -2801,8 +2802,9 @@ export default {
this.discussionArr.push(usrMessage) this.discussionArr.push(usrMessage)
nextTick(() => { nextTick(() => {
const msgList = document.getElementById('messages-list') const msgList = document.getElementById('messages-list')
if(msgList.length>0){
this.scrollBottom(msgList) this.scrollBottom(msgList)
}
}) })
}, },
@ -3825,7 +3827,6 @@ export default {
this.$store.state.news = this.$refs.news this.$store.state.news = this.$refs.news
this.$store.state.personality_editor = this.$refs.personality_editor this.$store.state.personality_editor = this.$refs.personality_editor
this.checkChangelogUpdate()
window.addEventListener('resize', this.adjustMenuPosition); window.addEventListener('resize', this.adjustMenuPosition);
socket.on('refresh_files',()=>{ socket.on('refresh_files',()=>{

View File

@ -54,14 +54,14 @@
<span class="text-xl text-gray-700 font-semibold">Loading...</span> <span class="text-xl text-gray-700 font-semibold">Loading...</span>
</div> </div>
<div v-else> <div v-else>
<div class="container mx-auto px-4 flex flex-column pb-20"> <div class="container mx-auto px-4 flex flex-col pb-20">
<!-- Favorite Apps Section --> <!-- Favorite Apps Section -->
<div v-if="favoriteApps.length > 0 && !searchQuery"> <div v-if="favoritePersonalities.length > 0 && !searchQuery">
<h2 class="text-2xl font-bold my-8">Favorite Apps</h2> <h2 class="text-2xl font-bold my-8">Favorite Personalities</h2>
<div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-8 mb-12"> <div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-8 mb-12">
<personality-entry <personality-entry
ref="personalitiesZoo" ref="personalitiesZoo"
v-for="pers in favoriteApps" v-for="pers in favoritePersonalities"
:key="pers.uid" :key="pers.uid"
:personality="pers" :personality="pers"
:select_language="true" :select_language="true"
@ -83,7 +83,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="container mx-auto px-4 flex flex-column pb-20"> <div class="container mx-auto px-4 flex flex-col pb-20">
<!-- Current Category Section --> <!-- Current Category Section -->
<h2 class="text-2xl font-bold my-8">{{ currentCategoryName }} ({{ sortedAndFilteredPersonalities.length }})</h2> <h2 class="text-2xl font-bold my-8">{{ currentCategoryName }} ({{ sortedAndFilteredPersonalities.length }})</h2>
<div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-8 mb-12"> <div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-8 mb-12">
@ -106,7 +106,7 @@
:on-copy-personality-name="onCopyPersonalityName" :on-copy-personality-name="onCopyPersonalityName"
:on-copy-to_custom="onCopyToCustom" :on-copy-to_custom="onCopyToCustom"
:on-open-folder="handleOpenFolder" :on-open-folder="handleOpenFolder"
:toggle-favorite="toggleFavorite" :on-toggle-favorite="toggleFavorite"
/> />
</div> </div>
</div> </div>
@ -220,7 +220,7 @@ export default {
}); });
}, },
favoriteApps() { favoritePersonalities() {
return this.combinedApps.filter(app => this.favorites.includes(app.uid)); return this.combinedApps.filter(app => this.favorites.includes(app.uid));
}, },
}, },

View File

@ -4499,15 +4499,14 @@
:class="fzl_collapsed ? '' : 'max-h-96'"> :class="fzl_collapsed ? '' : 'max-h-96'">
<TransitionGroup name="bounce"> <TransitionGroup name="bounce">
<function-entry ref="functionsZoo" v-for="(func, index) in functionsFiltered" <function-entry ref="functionsZoo" v-for="(func, index) in functionsFiltered"
:key="'index-' + index + '-' + func.name" :function="func" :key="'index-' + index + '-' + func.name"
:function_call="func"
:on-mount="mountFunction" :on-mount="mountFunction"
:on-unmount="unmountFunction" :on-unmount="unmountFunction"
:on-remount="remountFunction" :on-remount="remountFunction"
:on-edit="editFunction" :on-edit="editFunction"
:on-copy-to-custom="copyToCustom" :on-copy-to-custom="copyToCustom"
:on-reinstall="onFunctionReinstall" />
:on-settings="onSettingsFunction"
:on-toggle-favorite="toggleFavorite" />
</TransitionGroup> </TransitionGroup>
</div> </div>
</div> </div>
@ -4854,6 +4853,7 @@ import { nextTick } from 'vue'
import ModelEntry from '@/components/ModelEntry.vue'; import ModelEntry from '@/components/ModelEntry.vue';
import PersonalityViewer from '@/components/PersonalityViewer.vue'; import PersonalityViewer from '@/components/PersonalityViewer.vue';
import PersonalityEntry from "@/components/PersonalityEntry.vue"; import PersonalityEntry from "@/components/PersonalityEntry.vue";
import FunctionEntry from "@/components/FunctionEntry.vue";
import BindingEntry from "../components/BindingEntry.vue"; import BindingEntry from "../components/BindingEntry.vue";
import socket from '@/services/websocket.js' import socket from '@/services/websocket.js'
import defaultModelImgPlaceholder from "../assets/default_model.png" import defaultModelImgPlaceholder from "../assets/default_model.png"
@ -4884,6 +4884,7 @@ export default {
// eslint-disable-next-line vue/no-unused-components // eslint-disable-next-line vue/no-unused-components
PersonalityViewer, PersonalityViewer,
PersonalityEntry, PersonalityEntry,
FunctionEntry,
BindingEntry, BindingEntry,
ChoiceDialog, ChoiceDialog,
Card, Card,
@ -5059,11 +5060,15 @@ export default {
// Extract unique categories // Extract unique categories
const categories = new Set(this.allFunctions.map(func => func.category)); const categories = new Set(this.allFunctions.map(func => func.category));
this.funcCatgArr = Array.from(categories); this.funcCatgArr = Array.from(categories);
console.log("funcCatgArr: ");
console.log(this.funcCatgArr)
// Set the default category to the first one found // Set the default category to the first one found
if (this.funcCatgArr.length > 0) { if (this.funcCatgArr.length > 0) {
this.function_category = this.funcCatgArr[0]; this.function_category = this.funcCatgArr[0];
} }
console.log("function_category: ")
console.log(this.function_category )
// Filter functions based on the default category // Filter functions based on the default category
this.updateFilteredFunctions(); this.updateFilteredFunctions();
@ -5076,6 +5081,9 @@ export default {
this.functionsFiltered = this.allFunctions.filter( this.functionsFiltered = this.allFunctions.filter(
func => func.category === this.function_category func => func.category === this.function_category
); );
console.log("functionsFiltered: ");
console.log(this.functionsFiltered );
}, },
// Toggle favorite function // Toggle favorite function
toggleFavorite(funcUid) { toggleFavorite(funcUid) {
@ -5091,13 +5099,13 @@ export default {
// Mount a function // Mount a function
async mountFunction(func) { async mountFunction(func) {
try { try {
const response = await axios.post('/mount_function', { const response = await axios.post('/mount_function_call', {
client_id: this.$store.state.client_id, client_id: this.$store.state.client_id,
function_category: func.category,
function_name: func.name, function_name: func.name,
}); });
if (response.data.status) { if (response.data.status) {
this.showMessage('Function mounted successfully', true); this.showMessage('Function mounted successfully', true);
this.$store.dispatch('refreshMountedFunctions');
} else { } else {
this.showMessage('Failed to mount function', false); this.showMessage('Failed to mount function', false);
} }
@ -5110,15 +5118,19 @@ export default {
// Unmount a function // Unmount a function
async unmountFunction(func) { async unmountFunction(func) {
try { try {
console.log("Unmounting function")
const response = await axios.post('/unmount_function', { const response = await axios.post('/unmount_function', {
client_id: this.$store.state.client_id, client_id: this.$store.state.client_id,
function_name: func.name, function_name: func.name,
}); });
if (response.data.status) { if (response.data.status) {
this.showMessage('Function unmounted successfully', true); await this.$store.dispatch('refreshConfig');
this.$store.dispatch('refreshMountedFunctions'); this.$store.state.toast.show('Function mounted successfully!', 4, true)
this.$store.state.messageBox.showMessage('Function unmounted successfully', true);
func.mounted = true
} else { } else {
this.showMessage('Failed to unmount function', false); this.$store.state.toast.show('Failed to unmount function', 4, false)
this.$store.state.messageBox.showMessage('Failed to unmount function', false);
} }
} catch (error) { } catch (error) {
this.showMessage('Error unmounting function', false); this.showMessage('Error unmounting function', false);

@ -1 +1 @@
Subproject commit 3bf7e88bcff16adcc7fd8addb569266676feab17 Subproject commit 98f44bef458ca6725facdec46ac24b27be48df14

@ -1 +1 @@
Subproject commit c039a33c15eb332abb93d8fe52fdc649435abf13 Subproject commit e46da524e83e54409ef3e89137b40814bd081244