This commit is contained in:
Saifeddine ALOUI 2024-06-27 23:05:51 +02:00
parent 95f0bae21f
commit f94a574924
11 changed files with 44 additions and 40 deletions

2
app.py
View File

@ -13,6 +13,7 @@ from lollms.app import LollmsApplication
from lollms.paths import LollmsPaths
from lollms.main_config import LOLLMSConfig
from lollms.utilities import trace_exception
from lollms.security import sanitize_path
from lollms_webui import LOLLMSWebUI
from pathlib import Path
from ascii_colors import ASCIIColors
@ -236,6 +237,7 @@ if __name__ == "__main__":
# Custom route to serve JavaScript files with the correct MIME type
@app.get("/{path:path}")
async def serve_js(path: str):
sanitize_path(path)
if path=="":
return FileResponse(Path(__file__).parent / "web" / "dist" / "index.html", media_type="text/html")
file_path = Path(__file__).parent / "web" / "dist" / path

View File

@ -1,5 +1,5 @@
# =================== Lord Of Large Language Multimodal Systems Configuration file ===========================
version: 120
version: 121
binding_name: null
model_name: null
model_variant: null
@ -251,6 +251,8 @@ rag_check_new_files_at_startup: false #if true, the vectorizer will automaticall
rag_preprocess_chunks: false #if true, an LLM will preprocess the content of the chunk before writing it in a simple format
rag_activate_multi_hops: false #if true, we use multi hops algorithm to do multiple researches until the AI has enough data
rag_min_nb_tokens_in_chunk: 10 #this removed any useless junk ith less than x tokens
rag_max_n_hops: 3 #We set the maximum number of hop in multi hops rag
activate_skills_lib: false # Activate vectorizing previous conversations
skills_lib_database_name: "default" # Default skills database

@ -1 +1 @@
Subproject commit cb32fcb4742beb3e56dc4e61fdde965f7726bafc
Subproject commit 8b4aac2a1b4211dce18fb5613cc4fbf0eb3163f7

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-be013c6f.js"></script>
<link rel="stylesheet" href="/assets/index-9de3a734.css">
<script type="module" crossorigin src="/assets/index-f006aeca.js"></script>
<link rel="stylesheet" href="/assets/index-85705d97.css">
</head>
<body>
<div id="app"></div>

View File

@ -1,5 +1,5 @@
<template>
<div :id="`ui_${componentKey}`" class="w-full h-full overflow-y-auto scrollbar-thin scrollbar-track-bg-light-tone scrollbar-thumb-bg-light-tone-panel hover:scrollbar-thumb-primary dark:scrollbar-track-bg-dark-tone dark:scrollbar-thumb-bg-dark-tone-panel dark:hover:scrollbar-thumb-primary active:scrollbar-thumb-secondary" v-html="evaluatedCode" :key="componentKey">
<div :id="`ui_${componentKey}`" class="w-full h-auto overflow-y-auto scrollbar-thin scrollbar-track-bg-light-tone scrollbar-thumb-bg-light-tone-panel hover:scrollbar-thumb-primary dark:scrollbar-track-bg-dark-tone dark:scrollbar-thumb-bg-dark-tone-panel dark:hover:scrollbar-thumb-primary active:scrollbar-thumb-secondary" v-html="evaluatedCode" :key="componentKey">
</div>
</template>

View File

@ -214,7 +214,7 @@
</div>
</div>
<DynamicUIRenderer v-if="message.ui !== null && message.ui !== undefined && message.ui !== ''" class="w-full" :code="message.ui"></DynamicUIRenderer>
<DynamicUIRenderer class="w-full" :code="message.ui"></DynamicUIRenderer>
<audio controls v-if="audio_url!=null" :key="audio_url">
<source :src="audio_url" type="audio/wav" ref="audio_player" >
Your browser does not support the audio element.

View File

@ -1014,7 +1014,7 @@
<label for="rag_chunk_size" class="text-sm font-bold" style="margin-right: 1rem;">RAG chunk size:</label>
</td>
<td>
<input id="rag_chunk_size" v-model="configFile.data_vectorization_chunk_size"
<input id="rag_chunk_size" v-model="configFile.rag_chunk_size"
@change="settingsChanged=true"
type="range" min="2" 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">
@ -1031,7 +1031,7 @@
<label for="rag_n_chunks" class="text-sm font-bold" style="margin-right: 1rem;">RAG number of chunks:</label>
</td>
<td>
<input id="rag_n_chunks" v-model="configFile.data_vectorization_chunk_size"
<input id="rag_n_chunks" v-model="configFile.rag_n_chunks"
@change="settingsChanged=true"
type="range" min="2" 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">

@ -1 +1 @@
Subproject commit 6bd793fae9fc869b45a0f0e14b1bffe9697540e5
Subproject commit a5242e22aca41f38a307e1abd20daeb9ee719a69

@ -1 +1 @@
Subproject commit 89331b2f72d19592fcac564c627c1b38b7be05f0
Subproject commit 6e40e6b6d760d779e9bf4fed60b32d709e1cdc1e