Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/asg017/sqlite-vector
A SQLite extension for working with float and binary vectors. Work in progress!
https://github.com/asg017/sqlite-vector
sqlite sqlite-extension
Last synced: about 1 month ago
JSON representation
A SQLite extension for working with float and binary vectors. Work in progress!
- Host: GitHub
- URL: https://github.com/asg017/sqlite-vector
- Owner: asg017
- License: mit
- Created: 2023-01-06T20:58:48.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-02-10T17:10:41.000Z (almost 2 years ago)
- Last Synced: 2024-05-01T15:21:28.948Z (7 months ago)
- Topics: sqlite, sqlite-extension
- Language: C++
- Homepage:
- Size: 56.6 KB
- Stars: 16
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# sqlite-vector
A SQLite extension for working with float and binary vectors.
Still a work in progress, not meant to be wildly shared!
Once complete, you'll be able to do things like:
```sql
.load vector0-- create a "vector" object from json
select vector_from_json(
json('[0.1, 0.2, 0.3]')
);-- convert a vector object into a compact BLOB
select vector_to_blob(
vector_from_json(json('[0.1, 0.2, 0.3]'))
);
-- Result: X'760103000000cdcccc3dcdcc4c3e9a99993e'select vector_length(
vector_from_blob(X'760103000000cdcccc3dcdcc4c3e9a99993e')
);
-- Result: 3select vector_value_at(
vector_from_blob(X'760103000000cdcccc3dcdcc4c3e9a99993e'),
2
);
-- Result: 0.3select *
from vector_fvecs_each(readfile('sift1m_base.fvecs'));
```- `vector_fvecs_each_read()`
- `vector_ivecs_each()`
- `vector_ivecs_each_read()`
- `vector_bvecs_each()`
- `vector_bvecs_each_read()`