diff --git a/backend/open_webui/routers/knowledge.py b/backend/open_webui/routers/knowledge.py index 1b296fb1eb..63e0ff8d3e 100644 --- a/backend/open_webui/routers/knowledge.py +++ b/backend/open_webui/routers/knowledge.py @@ -441,7 +441,7 @@ def add_file_to_knowledge_by_id( ) -@router.post("/{id}/file/sync", response_model=Optional[KnowledgeFilesResponse]) +@router.post("/{id}/sync", response_model=Optional[KnowledgeFilesResponse]) def sync_file_to_knowledge_by_id( request: Request, id: str, diff --git a/src/lib/apis/knowledge/index.ts b/src/lib/apis/knowledge/index.ts index f436cb86bb..0af04c3604 100644 --- a/src/lib/apis/knowledge/index.ts +++ b/src/lib/apis/knowledge/index.ts @@ -215,7 +215,7 @@ export const addFileToKnowledgeById = async (token: string, id: string, fileId: export const syncFileToKnowledgeById = async (token: string, id: string, fileId: string) => { let error = null; - const res = await fetch(`${WEBUI_API_BASE_URL}/knowledge/${id}/file/sync`, { + const res = await fetch(`${WEBUI_API_BASE_URL}/knowledge/${id}/sync`, { method: 'POST', headers: { Accept: 'application/json',