Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/k1low/go-sqlite-vss
go-sqlite-vss is a "SQLite + SQLite Vector Similarity Search extension" driver for database/sql package.
https://github.com/k1low/go-sqlite-vss
faiss go sqlite sqlite-extension vector-search
Last synced: 30 days ago
JSON representation
go-sqlite-vss is a "SQLite + SQLite Vector Similarity Search extension" driver for database/sql package.
- Host: GitHub
- URL: https://github.com/k1low/go-sqlite-vss
- Owner: k1LoW
- License: mit
- Created: 2023-07-28T04:09:04.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-08-01T05:37:25.000Z (over 1 year ago)
- Last Synced: 2024-10-06T04:17:54.633Z (about 1 month ago)
- Topics: faiss, go, sqlite, sqlite-extension, vector-search
- Language: Go
- Homepage:
- Size: 658 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# go-sqlite-vss
`go-sqlite-vss` is a ["SQLite + SQLite Vector Similarity Search extension"](https://github.com/asg017/sqlite-vss) driver for database/sql package.
## Usage
Install [vector0 and vss0](https://github.com/asg017/sqlite-vss/releases).
``` console
$ # An example installation
$ gh ext install k1LoW/gh-setup
$ gh setup --repo github.com/asg017/sqlite-vss --bin-dir ${SQLITE_VSS_EXT_PATH} --match sqlite-vss-v.*-loadable --skip-content-type-check
```And then, use `sqlite-vss` as the driver name.
``` go
package mainimport (
"database/sql"
"fmt"
"log"
)func main() {
db, err := sql.Open("sqlite-vss", "test.db")
if err != nil {
log.Fatal(err)
}
defer db.Close()r := db.QueryRow("select vss_version();")
if err := r.Err(); err != nil {
log.Fatal(err)
}var version string
if err := r.Scan(&version); err != nil {
log.Fatal(err)
}fmt.Println(version)
// Output: v0.1.1
}
```## Test data
- [testdata/test.vec](testdata/test.vec) is created using data https://fasttext.cc/docs/en/crawl-vectors.html .
- License
- The word vectors are distributed under the [Creative Commons Attribution-Share-Alike License 3.0](https://creativecommons.org/licenses/by-sa/3.0/).
- References
- [E. Grave*, P. Bojanowski*, P. Gupta, A. Joulin, T. Mikolov, Learning Word Vectors for 157 Languages](https://arxiv.org/abs/1802.06893)