mirror of
https://github.com/asg017/sqlite-vec.git
synced 2026-04-25 00:36:56 +02:00
update go ncruces example
This commit is contained in:
parent
18e33edf14
commit
ff30ed3df3
4 changed files with 6 additions and 11 deletions
|
|
@ -7,11 +7,10 @@ import (
|
|||
"fmt"
|
||||
"log"
|
||||
|
||||
_ "github.com/asg017/sqlite-vec-ncruces-bindings"
|
||||
"github.com/ncruces/go-sqlite3"
|
||||
)
|
||||
|
||||
//go:embed sqlite3.vec.wasm
|
||||
var sqliteWithVecWasm []byte
|
||||
|
||||
func serializeFloat32(vector []float32) ([]byte, error) {
|
||||
buf := new(bytes.Buffer)
|
||||
|
|
@ -24,8 +23,6 @@ func serializeFloat32(vector []float32) ([]byte, error) {
|
|||
|
||||
|
||||
func main() {
|
||||
sqlite3.Binary = sqliteWithVecWasm
|
||||
|
||||
db, err := sqlite3.Open(":memory:")
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue