cache.wrapped_embeddings

chunktuner.cache.wrapped_embeddings

Wrap an EmbeddingFunction with SQLite caching.

CachedEmbeddingFunction

CachedEmbeddingFunction(inner, cache)

Delegates to inner while reading/writing vectors through EmbeddingCache.

Source code in src/chunktuner/cache/wrapped_embeddings.py
def __init__(self, inner: EmbeddingFunction, cache: EmbeddingCache):
    self._inner = inner
    self._cache = cache
    self.profile_name = inner.profile_name