mirror of
https://github.com/asg017/sqlite-vec.git
synced 2026-04-25 16:56:27 +02:00
Merge branch 'main' of github.com:asg017/sqlite-vec into main
This commit is contained in:
commit
9f14143e7b
3 changed files with 9 additions and 6 deletions
|
|
@ -33,7 +33,7 @@ anywhere! A successor to [`sqlite-vss`](https://github.com/asg017/sqlite-vss)
|
|||
<a href="https://hacks.mozilla.org/2024/06/sponsoring-sqlite-vec-to-enable-more-powerful-local-ai-applications/">Mozilla Builders project</a>,
|
||||
with additional sponsorship from
|
||||
<a href="https://fly.io/"><img width=14px src="./.github/logos/flyio.small.ico"/> Fly.io </a>,
|
||||
<a href="https://turso.tech/"><img width=14px src="./.github/logos/turso.small.ico"/> Turso</a>, and
|
||||
<a href="https://tur.so/sqlite-vec"><img width=14px src="./.github/logos/turso.small.ico"/> Turso</a>, and
|
||||
<a href="https://sqlitecloud.io/"><img width=14px src="./.github/logos/sqlitecloud.small.svg"/> SQLite Cloud</a>.
|
||||
See <a href="#sponsors">the Sponsors section</a> for more details.
|
||||
</i>
|
||||
|
|
@ -117,7 +117,7 @@ is the main sponsor through the new Builders project.
|
|||
</picture>
|
||||
</a>
|
||||
|
||||
<a href="https://turso.tech/">
|
||||
<a href="https://tur.so/sqlite-vec">
|
||||
<picture>
|
||||
<source media="(prefers-color-scheme: dark)" srcset="./.github/logos/turso.svg">
|
||||
<source media="(prefers-color-scheme: light)" srcset="./.github/logos/turso.svg">
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
```
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue