From 22ca79d0f3e53b94a6c813d161c35515198f77b9 Mon Sep 17 00:00:00 2001 From: Giovanni Date: Mon, 5 Aug 2024 14:14:40 -0400 Subject: [PATCH 1/3] Update Turso links (#63) --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f9be39f..38a0fda 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ anywhere! A successor to [`sqlite-vss`](https://github.com/asg017/sqlite-vss) Mozilla Builders project, with additional sponsorship from Fly.io , - Turso, and + Turso, and SQLite Cloud. See the Sponsors section for more details. @@ -117,7 +117,7 @@ is the main sponsor through the new Builders project. - + From bd5c847a97b3ef4daf36d724ea020112380cb39c Mon Sep 17 00:00:00 2001 From: Ikko Eltociear Ashimine Date: Tue, 6 Aug 2024 03:15:02 +0900 Subject: [PATCH 2/3] chore: update sqlite-vec.c (#61) identifer -> identifier --- sqlite-vec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sqlite-vec.c b/sqlite-vec.c index 4067731..daf13ad 100644 --- a/sqlite-vec.c +++ b/sqlite-vec.c @@ -2074,7 +2074,7 @@ int parse_vector_column(const char *source, int source_length, // any other tokens left should be column-level options , ex `key=value` // ex `distance_metric=L2 distance_metric=cosine` should error while (1) { - // should be EOF or identifer (option key) + // should be EOF or identifier (option key) rc = vec0_scanner_next(&scanner, &token); if (rc == VEC0_TOKEN_RESULT_EOF) { break; @@ -2099,7 +2099,7 @@ int parse_vector_column(const char *source, int source_length, return SQLITE_ERROR; } - // distance_metric value, an identifer (L2, cosine, etc) + // distance_metric value, an identifier (L2, cosine, etc) rc = vec0_scanner_next(&scanner, &token); if (rc != VEC0_TOKEN_RESULT_SOME && token.token_type != TOKEN_TYPE_IDENTIFIER) { From 5163f8ea401954795b1c2863f1cccec9d2ff047b Mon Sep 17 00:00:00 2001 From: Nuno Cruces Date: Tue, 6 Aug 2024 00:00:19 +0100 Subject: [PATCH 3/3] Update go docs (#56) I'm guessing this version (from the CGO example) is more widely applicable (I ship a `database/sql` driver as well). PS: if you find that all the copies and allocs are a bottleneck, I'm guessing an `buf, err := sqlite_vec .AppendFloat32(buf, values)`, or even an API change (on my side) that allows serializing directly into "native" memory, would help. --- site/using/go.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/site/using/go.md b/site/using/go.md index 84d794f..aced7f2 100644 --- a/site/using/go.md +++ b/site/using/go.md @@ -107,7 +107,10 @@ If vectors are provided as a list of floats, use `SerializeFloat32(list)` to ser values := []float32{0.1, 0.1, 0.1, 0.1} v, err := sqlite_vec.SerializeFloat32(values) if err != nil { - log.Fatal(err) + log.Fatal(err) +} +_, err = db.Exec("INSERT INTO vec_items(rowid, embedding) VALUES (?, ?)", id, v) +if err != nil { + log.Fatal(err) } -stmt.BindInt(1, id) ```