💡 All-in-one AI framework for semantic search, LLM orchestration and language model workflows
Python agentsaiai-agentsembeddingsinformation-retrievallanguage-modellarge-language-modelsllmnlppythonragretrieval-augmented-generationsearchsearch-enginesemantic-searchsentence-embeddingstransformerstxtaivector-databasevector-search
Reset archive instance on index
davidmezzettif881c2fd7bb5
diff --git a/src/python/txtai/embeddings/base.py b/src/python/txtai/embeddings/base.pyindex 7c44eabb..4ca7ab97 100644--- a/src/python/txtai/embeddings/base.py+++ b/src/python/txtai/embeddings/base.py@@ -56,7 +56,7 @@ class Embeddings:# Document databaseself.database = None- # Archiver+ # Index archiveself.archive = Nonedef score(self, documents):@@ -107,6 +107,9 @@ class Embeddings:# Save indexids-ids mapping for indexes with no databaseself.config["ids"] = ids+ # Reset archive since this is a new index+ self.archive = None+def upsert(self, documents):"""Runs an embeddings upsert operation. If the index exists, new data is@@ -419,7 +422,7 @@ class Embeddings:(working directory, current path) if this is an archive, original path otherwise"""- # Create archiver instance, if necessary+ # Create archive instance, if necessaryself.archive = self.archive if self.archive else Archive()# Check if path if an archive file