Skip to content

Commit

Permalink
Fix mislabeled API config definition, closes #231
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmezzetti committed Feb 28, 2022
1 parent dbaa27a commit 5167422
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@

setup(
name="txtai",
version="4.3.0",
version="4.2.1",
author="NeuML",
description="Build AI-powered semantic search applications",
long_description=DESCRIPTION,
Expand Down
2 changes: 1 addition & 1 deletion src/python/txtai/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@
logging.basicConfig(format="%(asctime)s [%(levelname)s] %(funcName)s: %(message)s")

# Current version tag
__version__ = "4.3.0"
__version__ = "4.2.1"
6 changes: 3 additions & 3 deletions src/python/txtai/api/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,10 @@ def __init__(self, config, loaddata=True):
self.pool = None

# Local embeddings index
if loaddata and self.config.get("path") and Embeddings().exists(self.config["path"], self.config.get("archive")):
if loaddata and self.config.get("path") and Embeddings().exists(self.config["path"], self.config.get("cloud")):
# Load existing index if available
self.embeddings = Embeddings()
self.embeddings.load(self.config["path"], self.config.get("archive"))
self.embeddings.load(self.config["path"], self.config.get("cloud"))
elif self.config.get("embeddings"):
# Initialize empty embeddings
self.embeddings = Embeddings(self.config["embeddings"])
Expand Down Expand Up @@ -349,7 +349,7 @@ def index(self):

# Save index if path available, otherwise this is an memory-only index
if self.config.get("path"):
self.embeddings.save(self.config["path"], self.config.get("archive"))
self.embeddings.save(self.config["path"], self.config.get("cloud"))

# Reset document stream
self.documents.close()
Expand Down

0 comments on commit 5167422

Please sign in to comment.