upgraded ui

This commit is contained in:
Saifeddine ALOUI 2024-04-14 23:33:26 +02:00
parent 31f3c76741
commit cdc889b3b6
6 changed files with 394 additions and 405 deletions

View File

@ -1,5 +1,5 @@
# =================== Lord Of Large Language Multimodal Systems Configuration file =========================== # =================== Lord Of Large Language Multimodal Systems Configuration file ===========================
version: 79 version: 80
binding_name: null binding_name: null
model_name: null model_name: null
model_variant: null model_variant: null
@ -143,11 +143,13 @@ use_files: true # Activate using files
data_vectorization_activate: true # To activate/deactivate data vectorization data_vectorization_activate: true # To activate/deactivate data vectorization
data_vectorization_method: "tfidf_vectorizer" #"model_embedding" or "tfidf_vectorizer" data_vectorization_method: "tfidf_vectorizer" #"model_embedding" or "tfidf_vectorizer"
data_visualization_method: "PCA" #"PCA" or "TSNE" data_visualization_method: "PCA" #"PCA" or "TSNE"
data_vectorization_sentense_transformer_model: "all-MiniLM-L6-v2" # you can use another model by setting its name here or its path
data_vectorization_save_db: False # For each new session, new files data_vectorization_save_db: False # For each new session, new files
data_vectorization_chunk_size: 512 # chunk size data_vectorization_chunk_size: 512 # chunk size
data_vectorization_overlap_size: 128 # overlap between chunks size data_vectorization_overlap_size: 128 # overlap between chunks size
data_vectorization_nb_chunks: 2 # number of chunks to use data_vectorization_nb_chunks: 2 # number of chunks to use
data_vectorization_build_keys_words: false # If true, when querrying the database, we use keywords generated from the user prompt instead of the prompt itself. data_vectorization_build_keys_words: true # If true, when querrying the database, we use keywords generated from the user prompt instead of the prompt itself.
data_vectorization_force_first_chunk: false # If true, the first chunk of the document will systematically be used data_vectorization_force_first_chunk: false # If true, the first chunk of the document will systematically be used
data_vectorization_make_persistance: false # If true, the data will be persistant webween runs data_vectorization_make_persistance: false # If true, the data will be persistant webween runs

@ -1 +1 @@
Subproject commit f8e7174b8bda67a373d298f07f0f8d2a35296a04 Subproject commit 132f5c0cf52fe0ef5e73a614471a5def70564b8e

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"> <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-0e1d9d54.js"></script> <script type="module" crossorigin src="/assets/index-e3754d9a.js"></script>
<link rel="stylesheet" href="/assets/index-92ff34ca.css"> <link rel="stylesheet" href="/assets/index-0fce8d86.css">
</head> </head>
<body> <body>
<div id="app"></div> <div id="app"></div>

View File

@ -103,7 +103,7 @@
<div class="flex gap-2 items-center "> <div class="flex gap-2 items-center ">
<div> <div>
<div v-if="vramUsage&&vramUsage.gpus && vramUsage.gpus.length == 1"> <div v-if="vramUsage&&vramUsage.gpus && vramUsage.gpus.length == 1">
<div class="flex gap-2 items-center " v-for="item in vramUsage.gpus"> <div class="flex gap-2 items-center " v-for="item in vramUsage.gpus" :key="item">
<!-- GPU IMAGE --> <!-- GPU IMAGE -->
<img :src="SVGGPU" width="25" height="25"> <img :src="SVGGPU" width="25" height="25">
@ -1022,218 +1022,205 @@
Data management settings</h3> Data management settings</h3>
</button> </button>
</div> </div>
<div :class="{ 'hidden': data_conf_collapsed }" class="flex flex-col mb-2 px-3 pb-0"></div> <div :class="{ 'hidden': data_conf_collapsed }" class="flex flex-col mb-2 px-3 pb-0">
<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">
<tr>
<td style="min-width: 200px;">
<label for="summerize_discussion" class="text-sm font-bold" style="margin-right: 1rem;">Activate Continuous Learning from discussions:</label>
</td>
<td>
<div class="flex flex-row">
<input
type="checkbox"
id="summerize_discussion"
required
v-model="configFile.summerize_discussion"
@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="data_vectorization_visualize_on_vectorization" class="text-sm font-bold" style="margin-right: 1rem;">show vectorized data:</label>
</td>
<td>
<div class="flex flex-row">
<input
type="checkbox"
id="data_vectorization_visualize_on_vectorization"
required
v-model="configFile.data_vectorization_visualize_on_vectorization"
@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="data_vectorization_build_keys_words" class="text-sm font-bold" style="margin-right: 1rem;">Reformulate prompt before querying database (advised):</label>
</td>
<td>
<div class="flex flex-row">
<input
type="checkbox"
id="data_vectorization_build_keys_words"
required
v-model="configFile.data_vectorization_build_keys_words"
@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="data_vectorization_force_first_chunk" class="text-sm font-bold" style="margin-right: 1rem;">Force adding the first chunk of the file to the context:</label>
</td>
<td>
<div class="flex flex-row">
<input
type="checkbox"
id="data_vectorization_force_first_chunk"
required
v-model="configFile.data_vectorization_force_first_chunk"
@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="data_vectorization_method" class="text-sm font-bold" style="margin-right: 1rem;">Data vectorization method:</label>
</td>
<td>
<select
id="data_vectorization_method"
required
v-model="configFile.data_vectorization_method"
@change="settingsChanged=true"
class="w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"
>
<option value="tfidf_vectorizer">tfidf Vectorizer</option>
<option value="bm25_vectorizer">bm25 Vectorizer</option>
<option value="model_embedding">Model Embedding</option>
<option value="sentense_transformer">Sentense Transformer</option>
</select>
</td>
</tr>
<tr>
<td style="min-width: 200px;">
<label for="data_vectorization_sentense_transformer_model" class="text-sm font-bold" style="margin-right: 1rem;">Data vectorization model (for Sentense Transformer):</label>
</td>
<td style="width: 100%;">
<input
type="text"
id="data_vectorization_sentense_transformer_model"
required
v-model="configFile.data_vectorization_sentense_transformer_model"
@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>
<tr>
<td style="min-width: 200px;">
<label for="data_visualization_method" class="text-sm font-bold" style="margin-right: 1rem;">Data visualization method:</label>
</td>
<td>
<select
id="data_visualization_method"
required
v-model="configFile.data_visualization_method"
@change="settingsChanged=true"
class="w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"
>
<option value="PCA">PCA</option>
<option value="TSNE">TSNE</option>
</select>
</td>
</tr>
<tr>
<td style="min-width: 200px;">
<label for="data_vectorization_save_db" class="text-sm font-bold" style="margin-right: 1rem;">Save the new files to the database (The database wil always grow and continue to be the same over many sessions):</label>
</td>
<td>
<div class="flex flex-row">
<input
type="checkbox"
id="data_vectorization_save_db"
required
v-model="configFile.data_vectorization_save_db"
@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="data_vectorization_chunk_size" class="text-sm font-bold" style="margin-right: 1rem;">Data vectorization chunk size(tokens):</label>
</td>
<td>
<input id="data_vectorization_chunk_size" v-model="configFile.data_vectorization_chunk_size"
@change="settingsChanged=true"
type="range" min="0" max="64000" step="1"
class="flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500">
<input v-model="configFile.data_vectorization_chunk_size"
<Card title="Data Vectorization" :is_subcard="true" class="pb-2 m-2"> type="number"
<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"> @change="settingsChanged=true"
<tr> class="w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"
<td style="min-width: 200px;"> >
<label for="use_files" class="text-sm font-bold" style="margin-right: 1rem;">Activate files support:</label> </td>
</td> </tr>
<td> <tr>
<div class="flex flex-row"> <td style="min-width: 200px;">
<input <label for="data_vectorization_overlap_size" class="text-sm font-bold" style="margin-right: 1rem;">Data vectorization overlap size(tokens):</label>
type="checkbox" </td>
id="use_files" <td>
required <input id="data_vectorization_overlap_size" v-model="configFile.data_vectorization_overlap_size"
v-model="configFile.use_files" @change="settingsChanged=true"
@change="settingsChanged=true" type="range" min="0" max="64000" step="1"
class="mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600" class="flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500">
> <input v-model="configFile.data_vectorization_overlap_size"
</div> type="number"
</td> @change="settingsChanged=true"
</tr> class="w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"
<tr> >
<td style="min-width: 200px;"> </td>
<label for="activate_ltm" class="text-sm font-bold" style="margin-right: 1rem;">Activate Long term memory:</label> </tr>
</td> <tr>
<td> <td style="min-width: 200px;">
<div class="flex flex-row"> <label for="data_vectorization_overlap_size" class="text-sm font-bold" style="margin-right: 1rem;">Number of chunks to use for each message:</label>
<input </td>
type="checkbox" <td>
id="activate_ltm" <input id="data_vectorization_nb_chunks" v-model="configFile.data_vectorization_nb_chunks"
required @change="settingsChanged=true"
v-model="configFile.activate_ltm" type="range" min="0" max="1000" step="1"
@change="settingsChanged=true" class="flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500">
class="mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600" <input v-model="configFile.data_vectorization_nb_chunks"
> type="number"
</div> @change="settingsChanged=true"
</td> class="w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"
</tr> >
<tr> </td>
<td style="min-width: 200px;"> </tr>
<label for="summerize_discussion" class="text-sm font-bold" style="margin-right: 1rem;">Activate Continuous Learning from discussions:</label>
</td> </table>
<td> </Card>
<div class="flex flex-row">
<input
type="checkbox"
id="summerize_discussion" </div>
required
v-model="configFile.summerize_discussion"
@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="data_vectorization_visualize_on_vectorization" class="text-sm font-bold" style="margin-right: 1rem;">show vectorized data:</label>
</td>
<td>
<div class="flex flex-row">
<input
type="checkbox"
id="data_vectorization_visualize_on_vectorization"
required
v-model="configFile.data_vectorization_visualize_on_vectorization"
@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="data_vectorization_activate" class="text-sm font-bold" style="margin-right: 1rem;">Activate data Vectorization:</label>
</td>
<td>
<div class="flex flex-row">
<input
type="checkbox"
id="data_vectorization_activate"
required
v-model="configFile.data_vectorization_activate"
@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="data_vectorization_build_keys_words" class="text-sm font-bold" style="margin-right: 1rem;">Build keywords when querying the vectorized database:</label>
</td>
<td>
<div class="flex flex-row">
<input
type="checkbox"
id="data_vectorization_build_keys_words"
required
v-model="configFile.data_vectorization_build_keys_words"
@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="data_vectorization_method" class="text-sm font-bold" style="margin-right: 1rem;">Data vectorization method:</label>
</td>
<td>
<select
id="data_vectorization_method"
required
v-model="configFile.data_vectorization_method"
@change="settingsChanged=true"
class="w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"
>
<option value="tfidf_vectorizer">tfidf Vectorizer</option>
<option value="model_embedding">Model Embedding</option>
</select>
</td>
</tr>
<tr>
<td style="min-width: 200px;">
<label for="data_visualization_method" class="text-sm font-bold" style="margin-right: 1rem;">Data visualization method:</label>
</td>
<td>
<select
id="data_visualization_method"
required
v-model="configFile.data_visualization_method"
@change="settingsChanged=true"
class="w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"
>
<option value="PCA">PCA</option>
<option value="TSNE">TSNE</option>
</select>
</td>
</tr>
<tr>
<td style="min-width: 200px;">
<label for="data_vectorization_save_db" class="text-sm font-bold" style="margin-right: 1rem;">Save the new files to the database (The database wil always grow and continue to be the same over many sessions):</label>
</td>
<td>
<div class="flex flex-row">
<input
type="checkbox"
id="data_vectorization_save_db"
required
v-model="configFile.data_vectorization_save_db"
@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="data_vectorization_chunk_size" class="text-sm font-bold" style="margin-right: 1rem;">Data vectorization chunk size(tokens):</label>
</td>
<td>
<input id="data_vectorization_chunk_size" v-model="configFile.data_vectorization_chunk_size"
@change="settingsChanged=true"
type="range" min="0" max="64000" step="1"
class="flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500">
<input v-model="configFile.data_vectorization_chunk_size"
type="number"
@change="settingsChanged=true"
class="w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"
>
</td>
</tr>
<tr>
<td style="min-width: 200px;">
<label for="data_vectorization_overlap_size" class="text-sm font-bold" style="margin-right: 1rem;">Data vectorization overlap size(tokens):</label>
</td>
<td>
<input id="data_vectorization_overlap_size" v-model="configFile.data_vectorization_overlap_size"
@change="settingsChanged=true"
type="range" min="0" max="64000" step="1"
class="flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500">
<input v-model="configFile.data_vectorization_overlap_size"
type="number"
@change="settingsChanged=true"
class="w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"
>
</td>
</tr>
<tr>
<td style="min-width: 200px;">
<label for="data_vectorization_overlap_size" class="text-sm font-bold" style="margin-right: 1rem;">Number of chunks to use for each message:</label>
</td>
<td>
<input id="data_vectorization_nb_chunks" v-model="configFile.data_vectorization_nb_chunks"
@change="settingsChanged=true"
type="range" min="0" max="1000" step="1"
class="flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500">
<input v-model="configFile.data_vectorization_nb_chunks"
type="number"
@change="settingsChanged=true"
class="w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"
>
</td>
</tr>
</table>
</Card>
</div> </div>