mirror of
https://github.com/open-webui/open-webui
synced 2025-01-19 09:16:44 +00:00
fix: missing parameter
This commit is contained in:
parent
d94134ad2d
commit
ba2964cb01
@ -520,6 +520,7 @@ async def reset_knowledge_by_id(id: str, user=Depends(get_verified_user)):
|
||||
|
||||
@router.post("/{id}/files/batch/add", response_model=Optional[KnowledgeFilesResponse])
|
||||
def add_files_to_knowledge_batch(
|
||||
request: Request,
|
||||
id: str,
|
||||
form_data: list[KnowledgeFileIdForm],
|
||||
user=Depends(get_verified_user),
|
||||
@ -555,7 +556,9 @@ def add_files_to_knowledge_batch(
|
||||
# Process files
|
||||
try:
|
||||
result = process_files_batch(
|
||||
BatchProcessFilesForm(files=files, collection_name=id)
|
||||
request=request,
|
||||
form_data=BatchProcessFilesForm(files=files, collection_name=id),
|
||||
user=user
|
||||
)
|
||||
except Exception as e:
|
||||
log.error(
|
||||
|
@ -1458,6 +1458,7 @@ class BatchProcessFilesResponse(BaseModel):
|
||||
|
||||
@router.post("/process/files/batch")
|
||||
def process_files_batch(
|
||||
request: Request,
|
||||
form_data: BatchProcessFilesForm,
|
||||
user=Depends(get_verified_user),
|
||||
) -> BatchProcessFilesResponse:
|
||||
@ -1504,7 +1505,10 @@ def process_files_batch(
|
||||
if all_docs:
|
||||
try:
|
||||
save_docs_to_vector_db(
|
||||
docs=all_docs, collection_name=collection_name, add=True
|
||||
request=request,
|
||||
docs=all_docs,
|
||||
collection_name=collection_name,
|
||||
add=True,
|
||||
)
|
||||
|
||||
# Update all files with collection name
|
||||
|
Loading…
Reference in New Issue
Block a user