SQLite-VecDB

 view release on metacpan or  search on metacpan

lib/SQLite/VecDB.pm  view on Meta::CPAN


Returns a L<SQLite::VecDB::Collection> for the given name. Creates the
underlying tables on first use.

=head2 collections

  my @names = $vdb->collections;

Returns the names of all existing collections.

=head1 WITH LANGERTHA — AUTOMATIC EMBEDDINGS

  use SQLite::VecDB;
  use Langertha::Engine::OpenAI;

  my $engine = Langertha::Engine::OpenAI->new(
    api_key => $ENV{OPENAI_API_KEY},
  );

  my $vdb = SQLite::VecDB->new(
    db_file    => 'vectors.db',

lib/SQLite/VecDB.pm  view on Meta::CPAN

    id   => 'doc1',
    text => 'Kubernetes is a container orchestration platform.',
  );

  # Query is automatically embedded
  my @results = $coll->search_text(
    text  => 'container management',
    limit => 5,
  );

=head1 EMBEDDING SETUP

SQLite::VecDB stores and searches raw vectors. To generate embeddings from
text, pass any L<Langertha> engine that supports L<Langertha::Role::Embedding>
as the C<embedding> attribute.

=head2 Local Embeddings with Ollama (Recommended for Getting Started)

The easiest way to run embeddings locally — no API key, no cloud, free:

  # Start Ollama in Docker



( run in 1.760 second using v1.01-cache-2.11-cpan-71847e10f99 )