Skip to content

armgit / txtai

Public Imported from GitHub
0

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

Update documentation and method naming convention

davidmezzetti6dddc99142e2
diff --git a/src/python/txtai/vectors/factory.py b/src/python/txtai/vectors/factory.py
index 994bce1d..74f0c051 100644
--- a/src/python/txtai/vectors/factory.py
+++ b/src/python/txtai/vectors/factory.py
@@ -56,6 +56,6 @@ class VectorsFactory:
# Infer method from path, if blank
if not method and path:
- method = "words" if WordVectors.isDatabase(path) else "transformers"
+ method = "words" if WordVectors.isdatabase(path) else "transformers"
return method
diff --git a/src/python/txtai/vectors/words.py b/src/python/txtai/vectors/words.py
index f93227ca..f4d8d579 100644
--- a/src/python/txtai/vectors/words.py
+++ b/src/python/txtai/vectors/words.py
@@ -48,7 +48,7 @@ def transform(document):
Multiprocessing helper method. Transforms document into an embeddings vector.
Args:
- document: (id, text|tokens, tags)
+ document: (id, dict|text|tokens, tags)
Returns:
(id, embedding)
@@ -152,7 +152,7 @@ class WordVectors(Vectors):
return self.model.query(tokens)
@staticmethod
- def isDatabase(path):
+ def isdatabase(path):
"""
Checks if this is a SQLite database file which is the file format used for word vectors databases.