This commit is contained in:
Timothy Jaeryang Baek
2024-11-21 21:32:19 -08:00
parent 9a2dd5b126
commit 12c8257c92
2 changed files with 8 additions and 6 deletions

View File

@@ -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),