Class OllamaEmbeddingFunction
java.lang.Object
com.tnsai.evaluation.rag.embedding.OllamaEmbeddingFunction
- All Implemented Interfaces:
com.tnsai.memory.advanced.EmbeddingFunction
public final class OllamaEmbeddingFunction
extends Object
implements com.tnsai.memory.advanced.EmbeddingFunction
EmbeddingFunction over an Ollama /api/embed endpoint.
Used only by the opt-in bench. Production RAG does not depend on this
client. Query and passage prefixes are applied here so mE5's
query:/passage: convention is not forgotten.
- Since:
- 0.14.0
-
Constructor Summary
ConstructorsConstructorDescriptionOllamaEmbeddingFunction(String baseUrl, String model, String queryPrefix, String documentPrefix) -
Method Summary
Modifier and TypeMethodDescriptionfloat[]float[]embedQuery(String text) Embeds a retrieval query with the model-specific query prefix.model()static booleanmodelAvailable(String baseUrl, String model) True when/api/tagslistsmodel.
-
Constructor Details
-
OllamaEmbeddingFunction
-
-
Method Details
-
model
-
embed
- Specified by:
embedin interfacecom.tnsai.memory.advanced.EmbeddingFunction
-
embedQuery
Embeds a retrieval query with the model-specific query prefix. -
modelAvailable
True when/api/tagslistsmodel.
-