mirror of
https://github.com/khoj-ai/khoj.git
synced 2025-02-17 08:04:21 +00:00
Add button on web interface to regenerate embeddings of specified type
This commit is contained in:
parent
231cc91e14
commit
ca3f93e641
1 changed files with 14 additions and 1 deletions
|
@ -26,6 +26,17 @@
|
|||
: 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>
|
||||
|
||||
<body>
|
||||
|
@ -44,6 +55,8 @@
|
|||
|
||||
<!--Add Button To Search -->
|
||||
<button id="search" onclick="search()">Search</button>
|
||||
<!--Add Button To Search -->
|
||||
<button id="regenerate" onclick="regenerate()">Regenerate</button>
|
||||
|
||||
<div id="results"></div>
|
||||
</body>
|
||||
|
@ -60,7 +73,7 @@
|
|||
grid-column: 2;
|
||||
margin: 10px;
|
||||
}
|
||||
#search {
|
||||
button {
|
||||
border-radius: 5px;
|
||||
border: 1px solid #ccc;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue