Skip to content

Commit 53f5af5

Browse files
committed
Ensure staticvectors is installed before calling method, closes #876
1 parent 64c1a5c commit 53f5af5

File tree

4 files changed

+7
-3
lines changed

4 files changed

+7
-3
lines changed

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@
130130

131131
setup(
132132
name="txtai",
133-
version="8.4.0",
133+
version="8.3.1",
134134
author="NeuML",
135135
description="All-in-one open-source embeddings database for semantic search, LLM orchestration and language model workflows",
136136
long_description=DESCRIPTION,

src/python/txtai/vectors/words.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ def isdatabase(path):
115115
True if this is a SQLite database
116116
"""
117117

118-
return isinstance(path, str) and Database.isdatabase(path)
118+
return isinstance(path, str) and STATICVECTORS and Database.isdatabase(path)
119119

120120
def __init__(self, config, scoring, models):
121121
# Check before parent constructor since it calls loadmodel

src/python/txtai/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
"""
44

55
# Current version tag
6-
__version__ = "8.4.0"
6+
__version__ = "8.3.1"

test/python/testoptional.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,10 @@ def testVectors(self):
306306
with self.assertRaises(ImportError):
307307
VectorsFactory.create({"method": "words"}, None)
308308

309+
# Test default model
310+
model = VectorsFactory.create({"path": "sentence-transformers/all-MiniLM-L6-v2"}, None)
311+
self.assertIsNotNone(model)
312+
309313
def testWorkflow(self):
310314
"""
311315
Test missing workflow dependencies

0 commit comments

Comments
 (0)