import type { EmbeddingAdapter, EmbeddingResult } from './types.js'; /** Options for {@link CachedEmbeddingAdapter}. */ export interface CachedEmbeddingOptions { /** * Cap on cached vectors; the oldest are evicted first. Default 10_000 — a * long-lived process embedding user-supplied text would otherwise grow the * map without bound, and each entry is a full vector. */ maxEntries?: number; } /** * In-memory caching wrapper for any EmbeddingAdapter. * * Caches embeddings by `model:text` key so repeated inputs skip the provider call. * Usage reflects what the provider actually charged: zero when every input was * served from cache, otherwise the usage of the call made for the cache misses. */ export declare class CachedEmbeddingAdapter implements EmbeddingAdapter { private inner; private cache; private readonly maxEntries; constructor(inner: EmbeddingAdapter, opts?: CachedEmbeddingOptions); embed(input: string | string[], model: string): Promise; /** Store one vector, evicting the oldest entries once the cap is exceeded. */ private remember; } //# sourceMappingURL=cached-embedding.d.ts.map