Package com.tnsai.memory.advanced
Interface EmbeddingFunction
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Functional interface for computing text embeddings.
Implementations may delegate to a local model, remote API, or any other embedding provider. The returned array must be a fixed-dimension float vector suitable for cosine similarity.
-
Method Summary
-
Method Details
-
embed
Computes an embedding vector for the given text.- Parameters:
text- the text to embed- Returns:
- a float array representing the embedding vector
-