feat(turso): add Turso backend - #842
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: uwu-420 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
/assign @XuanYang-cn |
| try: | ||
| connection.executemany( | ||
| "INSERT INTO vectors(id, embedding) VALUES (?, ?)", | ||
| [(int(row_id), vector.tobytes()) for row_id, vector in zip(metadata, vectors, strict=True)], |
There was a problem hiding this comment.
vectordb_bench/backend/clients/turso/turso.py line:111
High ---- Turso's vector_distance_* functions require vector32/vector64-encoded blobs, but this inserts raw NumPy float bytes directly. Those blobs are not valid Turso vectors, so every subsequent distance query will fail validation (or misinterpret the data) once the backend is used. Please encode each vector with Turso's vector32 representation before storing it.
Adding a backend for https://github.com/tursodatabase/turso