Update templates/index.html
Browse files- templates/index.html +3 -3
templates/index.html
CHANGED
@@ -1244,7 +1244,7 @@ async function createKnowledgeBase(event) {
|
|
1244 |
formData.append('file', fileInput.files[0]);
|
1245 |
|
1246 |
try {
|
1247 |
-
const response = await fetch('/api/knowledge', {
|
1248 |
method: 'POST',
|
1249 |
body: formData
|
1250 |
});
|
@@ -1284,7 +1284,7 @@ async function addFileToKnowledgeBase(form) {
|
|
1284 |
formData.append('file', fileInput.files[0]);
|
1285 |
|
1286 |
try {
|
1287 |
-
const response = await fetch(
|
1288 |
method: 'POST',
|
1289 |
body: formData
|
1290 |
});
|
@@ -1315,7 +1315,7 @@ async function deleteKnowledgeBase(knowledgeId) {
|
|
1315 |
}
|
1316 |
|
1317 |
try {
|
1318 |
-
const response = await fetch(
|
1319 |
method: 'DELETE'
|
1320 |
});
|
1321 |
|
|
|
1244 |
formData.append('file', fileInput.files[0]);
|
1245 |
|
1246 |
try {
|
1247 |
+
const response = await fetch('https://samlax12-agent.hf.space/api/knowledge', {
|
1248 |
method: 'POST',
|
1249 |
body: formData
|
1250 |
});
|
|
|
1284 |
formData.append('file', fileInput.files[0]);
|
1285 |
|
1286 |
try {
|
1287 |
+
const response = await fetch(`https://samlax12-agent.hf.space/api/knowledge/${knowledgeId}/documents`, {
|
1288 |
method: 'POST',
|
1289 |
body: formData
|
1290 |
});
|
|
|
1315 |
}
|
1316 |
|
1317 |
try {
|
1318 |
+
const response = await fetch(`https://samlax12-agent.hf.space/api/knowledge/${knowledgeId}`, {
|
1319 |
method: 'DELETE'
|
1320 |
});
|
1321 |
|