Update knowledge.py (#19434)

This commit is contained in:
Classic298 2025-11-24 21:22:23 +01:00 committed by GitHub
parent a7b611c0e5
commit 0a687980ee
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,6 +1,7 @@
from typing import List, Optional
from pydantic import BaseModel
from fastapi import APIRouter, Depends, HTTPException, status, Request, Query
from fastapi.concurrency import run_in_threadpool
import logging
from open_webui.models.knowledge import (
@ -223,7 +224,8 @@ async def reindex_knowledge_files(request: Request, user=Depends(get_verified_us
failed_files = []
for file in files:
try:
process_file(
await run_in_threadpool(
process_file,
request,
ProcessFileForm(
file_id=file.id, collection_name=knowledge_base.id