Skip to content

Commit

Permalink
Ensure staticvectors is installed before calling method, closes #876
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmezzetti committed Feb 12, 2025
1 parent 64c1a5c commit 53f5af5
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@

setup(
name="txtai",
version="8.4.0",
version="8.3.1",
author="NeuML",
description="All-in-one open-source embeddings database for semantic search, LLM orchestration and language model workflows",
long_description=DESCRIPTION,
Expand Down
2 changes: 1 addition & 1 deletion src/python/txtai/vectors/words.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def isdatabase(path):
True if this is a SQLite database
"""

return isinstance(path, str) and Database.isdatabase(path)
return isinstance(path, str) and STATICVECTORS and Database.isdatabase(path)

def __init__(self, config, scoring, models):
# Check before parent constructor since it calls loadmodel
Expand Down
2 changes: 1 addition & 1 deletion src/python/txtai/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
"""

# Current version tag
__version__ = "8.4.0"
__version__ = "8.3.1"
4 changes: 4 additions & 0 deletions test/python/testoptional.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,10 @@ def testVectors(self):
with self.assertRaises(ImportError):
VectorsFactory.create({"method": "words"}, None)

# Test default model
model = VectorsFactory.create({"path": "sentence-transformers/all-MiniLM-L6-v2"}, None)
self.assertIsNotNone(model)

def testWorkflow(self):
"""
Test missing workflow dependencies
Expand Down

0 comments on commit 53f5af5

Please sign in to comment.