feat: embedding model warning modal on frontend load
- InfoEndpoint: EmbeddingService injiziert, embeddingAvailable in /api/info Response - title.js: _showEmbeddingWarning() Modal via _createModal() wenn Modell fehlt - base.css: ol margin-left wie ul (geordnete Listen)
This commit is contained in:
1 parent
f941eae00a
commit
a646e695cd
3 files changed
+21
-3
No files matched your search
@@ -126,6 +126,6 @@ a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
ul {
|
||||
ul, ol {
|
||||
margin-left: 1.5em;
|
||||
}
|
||||
@@ -6,8 +6,24 @@ fetch('/api/info').then(r => r.json()).then(data => {
|
||||
serverIsWindows = !!data.isWindows;
|
||||
updateTitle();
|
||||
setInterval(updateTitle, 1000);
|
||||
if (data.embeddingAvailable === false) _showEmbeddingWarning();
|
||||
});
|
||||
|
||||
function _showEmbeddingWarning() {
|
||||
const { body } = _createModal('⚠️ Embedding-Modell nicht gefunden');
|
||||
body.style.lineHeight = '1.7';
|
||||
body.innerHTML =
|
||||
'<p>Das Embedding-Modell <strong>all-MiniLM-L6-v2</strong> wurde nicht gefunden. ' +
|
||||
'Ohne dieses Modell ist die semantische Suche (<code>memory_search</code>) deaktiviert.</p>' +
|
||||
'<h3>So richtest du es ein:</h3>' +
|
||||
'<ol>' +
|
||||
'<li>Lade das Modell herunter: <a href="https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2" target="_blank">HuggingFace – all-MiniLM-L6-v2</a></li>' +
|
||||
'<li>Benötigte Dateien: <code>model.onnx</code> und <code>vocab.txt</code></li>' +
|
||||
'<li>Lege sie ab unter:<br><code>data/models/all-MiniLM-L6-v2/model.onnx</code><br><code>data/models/all-MiniLM-L6-v2/vocab.txt</code></li>' +
|
||||
'<li>Starte den Server neu</li>' +
|
||||
'</ol>';
|
||||
}
|
||||
|
||||
function updateTitle() {
|
||||
if (!buildTime) { document.title = '// gott'; return; }
|
||||
const s = Math.floor(Date.now() / 1000) - buildTime;
|
||||
|
||||
Reference in new issue
Block a user