Package ai.velr
Interface VectorEmbedder
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Callback used by Velr vector indexes to produce embeddings.
Velr calls the registered embedder for index maintenance and vector queries. The callback
receives a batch of typed inputs and must return one finite vector per input. Every returned
vector must contain exactly VectorEmbeddingInput.dimensions() elements.
-
Method Summary
Modifier and TypeMethodDescriptionfloat[][]embed(List<VectorEmbeddingInput> inputs) Embed a batch of vector inputs.
-
Method Details
-
embed
Embed a batch of vector inputs.The returned array must contain one finite vector per input. Every vector must contain exactly the dimension count requested by the index.
- Parameters:
inputs- source rows or query payloads to embed- Returns:
- one vector per input
- Throws:
Exception- when the embedding model or callback fails
-