mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-16 11:57:51 +01:00
refac/fix: files batch/add endpoint
This commit is contained in:
@@ -708,7 +708,7 @@ async def reset_knowledge_by_id(id: str, user=Depends(get_verified_user)):
|
|||||||
|
|
||||||
|
|
||||||
@router.post("/{id}/files/batch/add", response_model=Optional[KnowledgeFilesResponse])
|
@router.post("/{id}/files/batch/add", response_model=Optional[KnowledgeFilesResponse])
|
||||||
def add_files_to_knowledge_batch(
|
async def add_files_to_knowledge_batch(
|
||||||
request: Request,
|
request: Request,
|
||||||
id: str,
|
id: str,
|
||||||
form_data: list[KnowledgeFileIdForm],
|
form_data: list[KnowledgeFileIdForm],
|
||||||
@@ -748,7 +748,7 @@ def add_files_to_knowledge_batch(
|
|||||||
|
|
||||||
# Process files
|
# Process files
|
||||||
try:
|
try:
|
||||||
result = process_files_batch(
|
result = await process_files_batch(
|
||||||
request=request,
|
request=request,
|
||||||
form_data=BatchProcessFilesForm(files=files, collection_name=id),
|
form_data=BatchProcessFilesForm(files=files, collection_name=id),
|
||||||
user=user,
|
user=user,
|
||||||
|
|||||||
Reference in New Issue
Block a user