This commit is contained in:
Timothy Jaeryang Baek
2026-08-11 17:35:05 -06:00
parent 65c3539666
commit 4f9a0ebf71
5 changed files with 192 additions and 44 deletions
+28
View File
@@ -955,6 +955,34 @@ export const reindexKnowledgeFiles = async (token: string) => {
return res;
};
export const reindexKnowledgeMetadata = async (token: string) => {
let error = null;
const res = await fetch(`${WEBUI_API_BASE_URL}/knowledge/metadata/reindex`, {
method: 'POST',
headers: {
Accept: 'application/json',
'Content-Type': 'application/json',
authorization: `Bearer ${token}`
}
})
.then(async (res) => {
if (!res.ok) throw await res.json();
return res.json();
})
.catch((err) => {
error = err.detail;
console.error(err);
return null;
});
if (error) {
throw error;
}
return res;
};
export const exportKnowledgeById = async (token: string, id: string) => {
let error = null;
+28
View File
@@ -128,6 +128,34 @@ export const queryMemory = async (token: string, content: string) => {
return res;
};
export const reindexMemoryVectors = async (token: string) => {
let error = null;
const res = await fetch(`${WEBUI_API_BASE_URL}/memories/reindex`, {
method: 'POST',
headers: {
Accept: 'application/json',
'Content-Type': 'application/json',
authorization: `Bearer ${token}`
}
})
.then(async (res) => {
if (!res.ok) throw await res.json();
return res.json();
})
.catch((err) => {
error = err.detail;
console.error(err);
return null;
});
if (error) {
throw error;
}
return res;
};
export const deleteMemoryById = async (token: string, id: string) => {
let error = null;