Skip to content
Snippets Groups Projects
Commit 3f2430bf authored by Embruch, Gerd's avatar Embruch, Gerd
Browse files

small changes

parent 6c7e5a19
Branches
No related tags found
No related merge requests found
......@@ -41,7 +41,7 @@ cp ./.env.template.local ./.env.production.local
- [x] chat
- [x] list chats
- [x] EMBEDDINGS
- [x] status [admin only]
- [x] status
- [x] delete vector db [admin only]
- [x] update embeddings [admin only]
......
......@@ -414,7 +414,7 @@ cp ./.env.template.local ./.env.production.local
</li>
<li><input type="checkbox" id="checkbox17" checked="true"><label for="checkbox17">EMBEDDINGS</label>
<ul>
<li><input type="checkbox" id="checkbox18" checked="true"><label for="checkbox18">status [admin only]</label></li>
<li><input type="checkbox" id="checkbox18" checked="true"><label for="checkbox18">status</label></li>
<li><input type="checkbox" id="checkbox19" checked="true"><label for="checkbox19">delete vector db [admin only]</label></li>
<li><input type="checkbox" id="checkbox20" checked="true"><label for="checkbox20">update embeddings [admin only]</label></li>
</ul>
......
......@@ -68,11 +68,8 @@ function PromptInput() {
try {
// send input to api
const result = await api.post('/ai/chat', inputs);
console.log("🚀 ~ handleSendForm ~ result id:", result.data.chat.id);
if (!currentChatId) fetchAllChats(result.data.chat.id);
// update chat history
updateChatHistory(result.data.chat.id, result.data.chat.chatHistory);
// selectChat(currentChatId);
......@@ -82,7 +79,6 @@ function PromptInput() {
} catch (error) {
console.error(error);
// merge front & backend validation errors
console.log("🚀 ~ handleSendForm ~ error:", error);
mergeBackendValidation(error.response.status, error.response.data, methods.setError);
}
......
......@@ -34,8 +34,6 @@ function CustomTable({ columns = [], data = {}, title = '' }) {
filterFns: {
regex: (rows, columnIds, filterValue) => {
try {
console.log("🚀 ~ CustomTable ~ rows.getValue(columnIds):", rows.getValue(columnIds));
const regex = new RegExp(filterValue, 'i');
return rows.getValue(columnIds).toString().match(regex) ? true : false;
} catch (error) {
......
......@@ -32,18 +32,11 @@ function Delete({ setStatus }) {
try {
// install item in backend
const result = await api.delete('/embeddings');
console.log("🚀 ~ handleDelete ~ result:", result);
// renew status
setStatus(result.data);
// show message from backend
setFlashMsg(result?.data?.message);
} catch (error) {
console.log("🚀 ~ handleDelete ~ error:", error);
mergeBackendValidation(error.response.status, error.response.data);
}
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment