Skip to content

armgit / txtai

Public Imported from GitHub
0

💡 All-in-one AI framework for semantic search, LLM orchestration and language model workflows

Modify file delete

davidmezzetti708fcaad725b
diff --git a/src/python/txtai/embeddings/base.py b/src/python/txtai/embeddings/base.py
index 730be18c..2cbfbbbe 100644
--- a/src/python/txtai/embeddings/base.py
+++ b/src/python/txtai/embeddings/base.py
@@ -116,7 +116,8 @@ class Embeddings:
self.config["ids"] = ids
# Delete mmap buffer file
- os.remove(embeddings.filename)
+ path = embeddings.filename
+ os.remove(path)
def upsert(self, documents):
"""
@@ -150,7 +151,8 @@ class Embeddings:
self.config["ids"] = self.config["ids"] + ids
# Delete mmap buffer file
- os.remove(embeddings.filename)
+ path = embeddings.filename
+ os.remove(path)
def delete(self, ids):
"""