mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-13 04:45:19 +00:00
Fix Python styling
This commit is contained in:
parent
33af80055b
commit
62311e4b5a
2 changed files with 3 additions and 9 deletions
|
|
@ -358,6 +358,7 @@ async def update_knowledge_by_id(
|
|||
class KnowledgeFileIdForm(BaseModel):
|
||||
file_id: str
|
||||
|
||||
|
||||
class KnowledgeFileIdsForm(BaseModel):
|
||||
file_ids: List[str]
|
||||
|
||||
|
|
@ -447,9 +448,6 @@ def add_file_to_knowledge_by_id(
|
|||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@router.post("/{id}/file/sync/batch", response_model=Optional[KnowledgeFilesResponse])
|
||||
def sync_files_to_knowledge_batch(
|
||||
request: Request,
|
||||
|
|
|
|||
|
|
@ -168,12 +168,8 @@ def sync_files_to_knowledge(
|
|||
except Exception as ve:
|
||||
log.debug(ve)
|
||||
try:
|
||||
if VECTOR_DB_CLIENT.has_collection(
|
||||
collection_name=f"file-{old_id}"
|
||||
):
|
||||
VECTOR_DB_CLIENT.delete_collection(
|
||||
collection_name=f"file-{old_id}"
|
||||
)
|
||||
if VECTOR_DB_CLIENT.has_collection(collection_name=f"file-{old_id}"):
|
||||
VECTOR_DB_CLIENT.delete_collection(collection_name=f"file-{old_id}")
|
||||
except Exception as ce:
|
||||
log.debug(ce)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue