EmbeddingCache
org.llm4s.llmconnect.caching.EmbeddingCache
@Stable
trait EmbeddingCache
Storage for the vectors of a CachedEmbeddingClient.
Every operation returns a Result, so a backend that can fail (Redis, a database) reports the failure instead of throwing. CachedEmbeddingClient treats a failed get as a miss and a failed put as not stored, and logs both: the provider still answers. Expiry and eviction are the backend's own concern, set when it is built (InMemoryEmbeddingCache.create takes a maxSize and a ttl).
Attributes
- Source
- EmbeddingCache.scala
- Graph
-
- Supertypes
- Known subtypes
-
class InMemoryEmbeddingCache
Members list
In this article
