Package dev.langchain4j.model.ollama
Class OllamaEmbeddingModel
java.lang.Object
dev.langchain4j.model.embedding.DimensionAwareEmbeddingModel
dev.langchain4j.model.ollama.OllamaEmbeddingModel
- All Implemented Interfaces:
EmbeddingModel
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from class dev.langchain4j.model.embedding.DimensionAwareEmbeddingModel
dimension
-
Constructor Summary
ConstructorsConstructorDescriptionOllamaEmbeddingModel
(HttpClientBuilder httpClientBuilder, String baseUrl, String modelName, Duration timeout, Integer maxRetries, Boolean logRequests, Boolean logResponses, Map<String, String> customHeaders) Deprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
embedAll
(List<TextSegment> textSegments) Embeds the text content of a list of TextSegments.Methods inherited from class dev.langchain4j.model.embedding.DimensionAwareEmbeddingModel
dimension, knownDimension
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface dev.langchain4j.model.embedding.EmbeddingModel
embed, embed
-
Constructor Details
-
OllamaEmbeddingModel
-
OllamaEmbeddingModel
@Deprecated(forRemoval=true, since="1.0.0-beta5") public OllamaEmbeddingModel(HttpClientBuilder httpClientBuilder, String baseUrl, String modelName, Duration timeout, Integer maxRetries, Boolean logRequests, Boolean logResponses, Map<String, String> customHeaders) Deprecated, for removal: This API element is subject to removal in a future version.please useOllamaEmbeddingModel(OllamaEmbeddingModelBuilder)
instead
-
-
Method Details
-
builder
-
embedAll
Description copied from interface:EmbeddingModel
Embeds the text content of a list of TextSegments.- Parameters:
textSegments
- the text segments to embed.- Returns:
- the embeddings.
-
OllamaEmbeddingModel(OllamaEmbeddingModelBuilder)
instead