mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-18 07:15:20 +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):
|
class KnowledgeFileIdForm(BaseModel):
|
||||||
file_id: str
|
file_id: str
|
||||||
|
|
||||||
|
|
||||||
class KnowledgeFileIdsForm(BaseModel):
|
class KnowledgeFileIdsForm(BaseModel):
|
||||||
file_ids: List[str]
|
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])
|
@router.post("/{id}/file/sync/batch", response_model=Optional[KnowledgeFilesResponse])
|
||||||
def sync_files_to_knowledge_batch(
|
def sync_files_to_knowledge_batch(
|
||||||
request: Request,
|
request: Request,
|
||||||
|
|
|
||||||
|
|
@ -168,12 +168,8 @@ def sync_files_to_knowledge(
|
||||||
except Exception as ve:
|
except Exception as ve:
|
||||||
log.debug(ve)
|
log.debug(ve)
|
||||||
try:
|
try:
|
||||||
if VECTOR_DB_CLIENT.has_collection(
|
if VECTOR_DB_CLIENT.has_collection(collection_name=f"file-{old_id}"):
|
||||||
collection_name=f"file-{old_id}"
|
VECTOR_DB_CLIENT.delete_collection(collection_name=f"file-{old_id}")
|
||||||
):
|
|
||||||
VECTOR_DB_CLIENT.delete_collection(
|
|
||||||
collection_name=f"file-{old_id}"
|
|
||||||
)
|
|
||||||
except Exception as ce:
|
except Exception as ce:
|
||||||
log.debug(ce)
|
log.debug(ce)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue