EmbeddingCache

org.llm4s.llmconnect.caching.EmbeddingCache
trait EmbeddingCache[Embedding]

Generic trait for embedding storage backends.

Type parameters

Embedding

The type of the embedding representation (usually Seq[Double]).

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class InMemoryEmbeddingCache[Embedding]

Members list

Value members

Abstract methods

def get(key: String): Option[Embedding]

Retrieves an embedding by its unique key.

Retrieves an embedding by its unique key.

Attributes

def put(key: String, embedding: Embedding): Unit

Stores an embedding associated with a unique key.

Stores an embedding associated with a unique key.

Attributes

def stats(): CacheStats

Returns performance metrics for this cache instance.

Returns performance metrics for this cache instance.

Attributes

Concrete methods

def clear(): Unit

Optional operation to reset the cache state.

Optional operation to reset the cache state.

Attributes