mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-09 21:29:11 +00:00
Add button on web interface to regenerate embeddings of specified type
This commit is contained in:
@@ -26,6 +26,17 @@
|
|||||||
: render_json(data);
|
: render_json(data);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function regenerate() {
|
||||||
|
type = document.getElementById("type").value;
|
||||||
|
fetch(`/regenerate?t=${type}`)
|
||||||
|
.then(response => response.json())
|
||||||
|
.then(data => {
|
||||||
|
console.log(data);
|
||||||
|
document.getElementById("results").innerHTML =
|
||||||
|
render_json(data);
|
||||||
|
});
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
@@ -44,6 +55,8 @@
|
|||||||
|
|
||||||
<!--Add Button To Search -->
|
<!--Add Button To Search -->
|
||||||
<button id="search" onclick="search()">Search</button>
|
<button id="search" onclick="search()">Search</button>
|
||||||
|
<!--Add Button To Search -->
|
||||||
|
<button id="regenerate" onclick="regenerate()">Regenerate</button>
|
||||||
|
|
||||||
<div id="results"></div>
|
<div id="results"></div>
|
||||||
</body>
|
</body>
|
||||||
@@ -60,7 +73,7 @@
|
|||||||
grid-column: 2;
|
grid-column: 2;
|
||||||
margin: 10px;
|
margin: 10px;
|
||||||
}
|
}
|
||||||
#search {
|
button {
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
border: 1px solid #ccc;
|
border: 1px solid #ccc;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user