mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-16 11:57:51 +01:00
refac
This commit is contained in:
@@ -893,10 +893,7 @@ def process_file(
|
||||
# Update the content in the file
|
||||
# Usage: /files/{file_id}/data/content/update
|
||||
|
||||
VECTOR_DB_CLIENT.delete(
|
||||
collection_name=f"file-{file.id}",
|
||||
filter={"file_id": file.id},
|
||||
)
|
||||
VECTOR_DB_CLIENT.delete(collection_name=f"file-{file.id}")
|
||||
|
||||
docs = [
|
||||
Document(
|
||||
@@ -1001,7 +998,7 @@ def process_file(
|
||||
collection_name=collection_name,
|
||||
metadata={
|
||||
"file_id": file.id,
|
||||
"name": file.meta.get("name", file.filename),
|
||||
"name": file.filename,
|
||||
"hash": hash,
|
||||
},
|
||||
add=(True if form_data.collection_name else False),
|
||||
|
||||
Reference in New Issue
Block a user