mirror of
https://github.com/ParisNeo/lollms-webui.git
synced 2024-12-18 20:17:50 +00:00
upgraded ui
This commit is contained in:
parent
69ae926bc8
commit
d609ef842c
@ -508,7 +508,17 @@ class LoLLMsAPPI(LollmsApplication):
|
||||
client_id = request.sid
|
||||
self.connections[client_id]["generated_text"] = ""
|
||||
self.connections[client_id]["cancel_generation"] = False
|
||||
|
||||
|
||||
if not self.config.use_files:
|
||||
self.socketio.emit('file_received',
|
||||
{
|
||||
"status":False,
|
||||
"filename":data["filename"],
|
||||
"error":"Couldn't receive file: Verify that file type is compatible with the personality"
|
||||
}, room=client_id
|
||||
)
|
||||
return
|
||||
|
||||
try:
|
||||
self.personality.setCallback(partial(self.process_chunk,client_id = client_id))
|
||||
ASCIIColors.info("Recovering file from front end")
|
||||
@ -821,7 +831,7 @@ class LoLLMsAPPI(LollmsApplication):
|
||||
ASCIIColors.blue(f"Your personal data is stored here :",end="")
|
||||
ASCIIColors.green(f"{self.lollms_paths.personal_path}")
|
||||
|
||||
|
||||
|
||||
def rebuild_personalities(self, reload_all=False):
|
||||
if reload_all:
|
||||
self.mounted_personalities=[]
|
||||
|
@ -1,5 +1,5 @@
|
||||
# =================== Lord Of Large Language Models Configuration file ===========================
|
||||
version: 20
|
||||
version: 21
|
||||
binding_name: null
|
||||
model_name: null
|
||||
|
||||
@ -51,10 +51,12 @@ audio_auto_send_input: true
|
||||
audio_silenceTimer: 5000
|
||||
|
||||
# Data vectorization
|
||||
use_files: true # Activate using files
|
||||
data_vectorization_activate: true # To activate/deactivate data vectorization
|
||||
data_vectorization_method: "ftidf_vectorizer" #"model_embedding" or "ftidf_vectorizer"
|
||||
data_visualization_method: "PCA" #"PCA" or "TSNE"
|
||||
data_vectorization_save_db: False # For each new session, new files
|
||||
data_vectorization_chunk_size: 512 # chunk size
|
||||
data_vectorization_overlap_size: 128 # overlap between chunks size
|
||||
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: false # If true, when querrying the database, we use keywords generated from the user prompt instead of the prompt itself.
|
||||
|
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-6f3da9c3.js"></script>
|
||||
<link rel="stylesheet" href="/assets/index-3f235fde.css">
|
||||
<script type="module" crossorigin src="/assets/index-90b5b8a8.js"></script>
|
||||
<link rel="stylesheet" href="/assets/index-26a46f99.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
|
@ -554,8 +554,8 @@
|
||||
</button>
|
||||
</div>
|
||||
<div :class="{ 'hidden': minconf_collapsed }" class="flex flex-col mb-2 px-3 pb-0">
|
||||
<div class="flex flex-row mb-2 px-3 pb-2">
|
||||
<Card title="General" is_subcard="True" class="pb-2 m-2 expand-to-fit">
|
||||
<div class="flex flex-col mb-2 px-3 pb-2">
|
||||
<Card title="General" is_subcard="True" class="pb-2 m-2">
|
||||
<table class="expand-to-fit bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block 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;">
|
||||
@ -675,7 +675,7 @@
|
||||
</td>
|
||||
<td style="width: 100%;">
|
||||
<label for="avatar-upload">
|
||||
<img :src="configFile.user_avatar" class="w-50 h-50 rounded-full" style="max-width: 50px; max-height: 50px; cursor: pointer;">
|
||||
<img :src="'/user_infos/'+configFile.user_avatar" class="w-50 h-50 rounded-full" style="max-width: 50px; max-height: 50px; cursor: pointer;">
|
||||
</label>
|
||||
<input type="file" id="avatar-upload" style="display: none" @change="uploadAvatar">
|
||||
</td>
|
||||
@ -698,8 +698,169 @@
|
||||
</tr>
|
||||
</table>
|
||||
</Card>
|
||||
<Card title="Files 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="use_files" class="text-sm font-bold" style="margin-right: 1rem;">Activate files support:</label>
|
||||
</td>
|
||||
<td>
|
||||
<input
|
||||
type="checkbox"
|
||||
id="use_files"
|
||||
required
|
||||
v-model="configFile.use_files"
|
||||
@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_activate" class="text-sm font-bold" style="margin-right: 1rem;">Activate files vectorization:</label>
|
||||
</td>
|
||||
<td>
|
||||
<input
|
||||
type="checkbox"
|
||||
id="data_vectorization_activate"
|
||||
required
|
||||
v-model="configFile.data_vectorization_activate"
|
||||
@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_build_keys_words" class="text-sm font-bold" style="margin-right: 1rem;">Build keywords when querying the vectorized database:</label>
|
||||
</td>
|
||||
<td>
|
||||
<input
|
||||
type="checkbox"
|
||||
id="data_vectorization_build_keys_words"
|
||||
required
|
||||
v-model="configFile.data_vectorization_build_keys_words"
|
||||
@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_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="ftidf_vectorizer">ftidf 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>
|
||||
<input
|
||||
type="checkbox"
|
||||
id="data_vectorization_save_db"
|
||||
required
|
||||
v-model="configFile.data_vectorization_save_db"
|
||||
@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_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"
|
||||
@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"
|
||||
@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"
|
||||
@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>
|
||||
<Card title="Audio" 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="audio_auto_send_input" class="text-sm font-bold" style="margin-right: 1rem;">Send audio input automatically:</label>
|
||||
</td>
|
||||
<td>
|
||||
<input
|
||||
type="checkbox"
|
||||
id="audio_auto_send_input"
|
||||
required
|
||||
v-model="configFile.audio_auto_send_input"
|
||||
@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="auto_speak" class="text-sm font-bold" style="margin-right: 1rem;">Enable auto speak:</label>
|
||||
@ -714,7 +875,7 @@
|
||||
class="w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"
|
||||
>
|
||||
</td>
|
||||
</tr>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="min-width: 200px;">
|
||||
<label for="audio_pitch" class="text-sm font-bold" style="margin-right: 1rem;">audio pitch:</label>
|
||||
@ -724,13 +885,28 @@
|
||||
@change="settingsChanged=true"
|
||||
type="range" min="0" max="10" step="0.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">
|
||||
|
||||
<p
|
||||
<input v-model="configFile.audio_pitch"
|
||||
@change="settingsChanged=true"
|
||||
class="w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"
|
||||
>{{ audio_pitch }}</p>
|
||||
>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td style="min-width: 200px;">
|
||||
<label for="audio_silenceTimer" class="text-sm font-bold" style="margin-right: 1rem;">audio in silence timer (ms):</label>
|
||||
</td>
|
||||
<td>
|
||||
<input id="audio_silenceTimer" v-model="configFile.audio_silenceTimer"
|
||||
@change="settingsChanged=true"
|
||||
type="range" min="0" max="10000" 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.audio_silenceTimer"
|
||||
@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="audio_in_language" class="text-sm font-bold" style="margin-right: 1rem;">Input Audio Language:</label>
|
||||
@ -1367,7 +1543,7 @@
|
||||
|
||||
</div>
|
||||
|
||||
<input id="temperature" @change="update_setting('temperature', $event.target.value)"
|
||||
<input id="temperature"
|
||||
type="range" v-model="configFile.temperature" min="0" max="5" step="0.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">
|
||||
</div>
|
||||
@ -1388,7 +1564,8 @@
|
||||
|
||||
</div>
|
||||
|
||||
<input id="predict" @change="update_setting('n_predict', $event.target.value)" type="range"
|
||||
<input id="predict"
|
||||
type="range"
|
||||
v-model="configFile.n_predict" min="0" max="2048" step="32"
|
||||
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">
|
||||
</div>
|
||||
@ -1409,7 +1586,8 @@
|
||||
|
||||
</div>
|
||||
|
||||
<input id="top_k" @change="update_setting('top_k', $event.target.value)" type="range"
|
||||
<input id="top_k"
|
||||
type="range"
|
||||
v-model="configFile.top_k" min="0" max="100" 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">
|
||||
</div>
|
||||
@ -1430,7 +1608,8 @@
|
||||
|
||||
</div>
|
||||
|
||||
<input id="top_p" @change="update_setting('top_p', $event.target.value)" type="range"
|
||||
<input id="top_p"
|
||||
type="range"
|
||||
v-model="configFile.top_p" min="0" max="1" step="0.01"
|
||||
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">
|
||||
</div>
|
||||
@ -1451,7 +1630,7 @@
|
||||
|
||||
</div>
|
||||
|
||||
<input id="repeat_penalty" @change="update_setting('repeat_penalty', $event.target.value)"
|
||||
<input id="repeat_penalty"
|
||||
type="range" v-model="configFile.repeat_penalty" min="0" max="2" step="0.01"
|
||||
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">
|
||||
</div>
|
||||
@ -1472,7 +1651,7 @@
|
||||
|
||||
</div>
|
||||
|
||||
<input id="repeat_last_n" @change="update_setting('repeat_last_n', $event.target.value)"
|
||||
<input id="repeat_last_n"
|
||||
type="range" v-model="configFile.repeat_last_n" min="0" max="100" 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">
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user