"demo").print_version() VectoyLite(
sqlite_version=3.46.1, vec_version=v0.1.1
VectoyLite (path:str)
Initializes the VectoLite instance with a connection to the SQLite database.
Type | Details | |
---|---|---|
path | str | The path to the SQLite database file. |
VectoyLite.print_version ()
Prints the SQLite and SQLite-vec versions.
VectoyLite.parse_item (item:Dict)
Parses an item and returns its MD5 hash, serialized contents, and vector. This is mainly meant as an internal method, but there may be times when you want to confirm these manually.
Type | Details | |
---|---|---|
item | Dict | The item to parse. |
Returns | tuple | A tuple containing the MD5 hash (str), serialized contents (str), and serialized vector (bytes). |
('fbc24bcc7a1794758fc1327fcfebdaf6', b'{"hello":"world"}', [1, 2, 3])
('a8af219242bb71a1c085ee0c7e16e322', b'{"hello":"world!"}', [1, 2, 3])
VectoyLite.insert (stream)
Inserts a stream of items into the specified table.
Type | Details | |
---|---|---|
stream | An iterable stream of dictionaries to insert. |
a8af219242bb71a1c085ee0c7e16e322 b'{"hello":"world!"}' [1, 2, 3, 4]
VectoyLite.query_idx (query, k=5)
Queries the specified table for the nearest neighbors to the given query vector.
Type | Default | Details | |
---|---|---|---|
query | The query vector | ||
k | int | 5 | |
Returns | tuple | A tuple containing the rowids and distances of the nearest neighbors. |
VectoyLite.query (query, k=5)
Queries the specified table for the nearest neighbors to the given query vector.
Type | Default | Details | |
---|---|---|---|
query | The query vector | ||
k | int | 5 | |
Returns | tuple | A tuple containing the inserted items and distances of the nearest neighbors. |