GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - refpath/sqlite_vec: A wrapper to use sqlite-vec in Elixir

BranchesTags
Open more actions menu
 
 

Latest commit

 

History

50 Commits
50 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
lib
lib
 
 
notebooks
notebooks
 
 
priv
priv
 
 
test
test
 
 
.formatter.exs
.formatter.exs
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
mix.exs
mix.exs
 
 
mix.lock
mix.lock
 
 

Repository files navigation

SqliteVec

Hex Package Hex Docs Build Status

Important

I won't publish another release on hex.pm. Here is a PR to get this into the official sqlite-vec repository. Future versions will be published from there.

A wrapper to use sqlite-vec, a SQLite extension for working with vectors, in Elixir. The configured version of the precompiled loadable library will be downloaded from the GitHub releases. Moreover, this package provides structs and custom Ecto types for working with Float32, Int8, and Bit vectors.

Limitations

  • it's currently not possible to create int8 and bit vectors using Ecto. You must directly use SQL to do so
  • not implemented operations: vec_each, vec_quantize_i8

Installation

The package can be installed by adding sqlite_vec to your list of dependencies in mix.exs:

def deps do
  [
    {:sqlite_vec, "~> 0.1.0"}
  ]
end

Getting Started

SqliteVec.path/0 returns the path of the downloaded library. Therefore, you can load the extension using this path.

For instance with Exqlite:

{:ok, conn} = Basic.open(":memory:")
:ok = Basic.enable_load_extension(conn)

Basic.load_extension(conn, SqliteVec.path())

Or, with an Ecto.Repo and ecto_sqlite3:

defmodule MyApp.Repo do
  use Ecto.Repo,
    otp_app: :my_app,
    adapter: Ecto.Adapters.SQLite3
end

config :my_app, MyApp.Repo, load_extensions: [SqliteVec.path()]

You can check out the Getting Started and Usage with Ecto notebooks.

Attribution

Special thanks to these projects that helped to make this package:

  • OctoFetch which does all the work for downloading the GitHub releases, and served as a blueprint for this package (yes, including this Attribution section :) )
  • sqlite-vec, of course, which provides all of the functionality
  • pgvector provides something similar for postgres and quite some code could be reused

About

A wrapper to use sqlite-vec in Elixir

Resources

Readme
License

Code of conduct

Code of conduct

Contributing

Contributing

Security policy

Security policy
Activity
Custom properties

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.