This commit is contained in:
Saifeddine ALOUI 2024-06-18 01:08:15 +02:00
parent fba2a5c495
commit 8e7f29c3cd
9 changed files with 356 additions and 334 deletions

View File

@ -1,5 +1,5 @@
# =================== Lord Of Large Language Multimodal Systems Configuration file ===========================
version: 113
version: 114
binding_name: null
model_name: null
model_variant: null
@ -239,7 +239,7 @@ audio_auto_send_input: true
audio_silenceTimer: 5000
# Data vectorization
data_sources: [] # This is the list of paths to database sources. Each database is a folder containing data
rag_databases: [] # This is the list of paths to database sources. Each database is a folder containing data
activate_skills_lib: false # Activate vectorizing previous conversations
skills_lib_database_name: "default" # Default skills database

@ -1 +1 @@
Subproject commit 25c9ee57da21ce96e8ab280db258f5a1186cb618
Subproject commit 8ca1e3c2c054ecd88301d1358ab57f97cb98ebac

View File

@ -701,14 +701,6 @@ class LOLLMSWebUI(LOLLMSElfServer):
return title[0]
def recover_discussion(self,client_id, message_index=-1):
messages = self.session.get_client(client_id).discussion.get_messages()
discussion=""
for msg in messages:
if message_index!=-1 and msg>message_index:
break
discussion += "\n" + self.config.discussion_prompt_separator + msg.sender + ": " + msg.content.strip()
return discussion
def get_discussion_to(self, client_id, message_id=-1):

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 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>LoLLMS WebUI - Welcome</title>
<script type="module" crossorigin src="/assets/index-4dc4b1d7.js"></script>
<link rel="stylesheet" href="/assets/index-1c340000.css">
<script type="module" crossorigin src="/assets/index-19c8685c.js"></script>
<link rel="stylesheet" href="/assets/index-0938ac6a.css">
</head>
<body>
<div id="app"></div>

View File

@ -477,13 +477,21 @@ export default {
return Array.isArray(this.dataSourceNames) && this.dataSourceNames.length > 0;
},
dataSourceNames() {
// Extract the names from the data_sources array
return this.$store.state.config.data_sources.map(dataSource => {
// Assuming the name is part of the path, extract it here
// For example, if the path is "path/to/databaseName", extract "databaseName"
const parts = dataSource.split('::');
return parts[0];
});
console.log("dataSourceNames", this.$store.state.config.data_sources);
// Extract the names from the data_sources array and transform them into the desired format
const formattedDataSources = this.$store.state.config.data_sources.map(dataSource => {
console.log("entry", dataSource);
const parts = dataSource.split('::');
console.log("extracted", parts[0]);
return {
name: parts[0],
value: parts[1] || 'default_value',
icon: 'feather:file',
help: 'start'
};
});
console.log("formatted data sources", formattedDataSources);
return formattedDataSources;
},
currentBindingIcon(){
return this.currentBinding.icon || this.modelImgPlaceholder;

View File

@ -64,6 +64,7 @@ import feather from 'feather-icons'
import axios from "axios";
import InteractiveMenu from "@/components/InteractiveMenu.vue"
import socket from '@/services/websocket.js'
import { nextTick, ref, TransitionGroup } from 'vue'
export default {
components:{
@ -88,6 +89,11 @@ data() {
};
},
async mounted() {
// Example commands data
this.commands = this.commandsList;
console.log("Commands",this.commands)
document.addEventListener('click', this.handleClickOutside);
//this.fileSize = await this.getFileSize(this.model.path)
//console.log('model path', this.model.path)
nextTick(() => {
@ -181,12 +187,6 @@ methods: {
}
},
},
mounted() {
// Example commands data
this.commands = this.commandsList;
document.addEventListener('click', this.handleClickOutside);
},
beforeUnmount() {
document.removeEventListener('click', this.handleClickOutside);
},

View File

@ -956,13 +956,13 @@
<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="data_sources" class="text-sm font-bold" style="margin-right: 1rem;">Data Sources:</label>
<label for="rag_databases" class="text-sm font-bold" style="margin-right: 1rem;">Data Sources:</label>
</td>
<td style="width: 100%;">
<div v-for="(source, index) in configFile.data_sources" :key="index" class="flex items-center mb-2">
<div v-for="(source, index) in configFile.rag_databases" :key="index" class="flex items-center mb-2">
<input
type="text"
v-model="configFile.data_sources[index]"
v-model="configFile.rag_databases[index]"
@change="settingsChanged=true"
class="w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"
>
@ -2596,6 +2596,28 @@
</td>
</tr>
<tr>
<td style="min-width: 200px;">
<label for="comfyui_model" class="text-sm font-bold" style="margin-right: 1rem;">Enable comfyui model:</label>
</td>
<td>
<div class="flex flex-row">
<input
type="text"
id="comfyui_model"
required
v-model="configFile.comfyui_model"
@change="settingsChanged=true"
class="mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"
>
</div>
</td>
<td>
<div class="hover:text-secondary duration-75 active:scale-90 peer-checked:text-primary" @click="this.$store.state.messageBox.showMessage('Activates Stable diffusion service. The service will be automatically loaded at startup alowing you to use the stable diffusion endpoint to generate images')">
<i data-feather="help-circle" class="w-5 h-5 "></i>
</div>
</td>
</tr>
<tr>
<td style="min-width: 200px;">
</td>
<td>
@ -3919,11 +3941,11 @@ export default {
},
methods: {
addDataSource() {
this.$store.state.config.data_sources.push('');
this.$store.state.config.rag_databases.push('');
this.settingsChanged = true;
},
removeDataSource(index) {
this.$store.state.config.data_sources.splice(index, 1);
this.$store.state.config.rag_databases.splice(index, 1);
this.settingsChanged = true;
},
async select_folder(index){
@ -3932,8 +3954,8 @@ export default {
if (infos){
console.log(infos.data)
console.log(index)
console.log(this.$store.state.config.data_sources)
this.$store.state.config.data_sources[index]=`${infos.data["database_name"]}::${infos.data["database_path"]}`
console.log(this.$store.state.config.rag_databases)
this.$store.state.config.rag_databases[index]=`${infos.data["database_name"]}::${infos.data["database_path"]}`
this.settingsChanged=true;
}
else{