Skip to content

Optional caching #4

@asg017

Description

@asg017

Capture all generated embeddings, and store them separately in a different database with SHA1 content hashes. That way, mostly when developing, rembed() will lookup entries in the cache first to avoid API calls.

Maybe a config option to store cache in an attached database? would help with in-memory lookups I guess

attach database ":memory:" as rembed_cache;

insert into temp.rembed_clients(name, options) 
  values (
    'text-embedding-3-small', 
    rembed_client_options(
      'format', 'openai', 
      'cache', 'rembed_cache'
    )
  );

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions