Fix code example in ollama-embeddings documentation
Correct the OllamaEmbeddingModel initialization and options syntax in the ollama-embeddings.adoc file. Remove unnecessary .toMap() call and fix typo in withTruncate method name.
This commit is contained in:
@@ -184,14 +184,13 @@ var ollamaApi = new OllamaApi();
|
||||
var embeddingModel = new OllamaEmbeddingModel(ollamaApi,
|
||||
OllamaOptions.builder()
|
||||
.withModel(OllamaModel.MISTRAL.id())
|
||||
.build()
|
||||
.toMap());
|
||||
.build());
|
||||
|
||||
EmbeddingResponse embeddingResponse = embeddingModel.call(
|
||||
new EmbeddingRequest(List.of("Hello World", "World is big and salvation is near"),
|
||||
OllamaOptions.builder()
|
||||
.withModel("chroma/all-minilm-l6-v2-f32"))
|
||||
.withtTruncate(false)
|
||||
.withTruncate(false)
|
||||
.build());
|
||||
----
|
||||
|
||||
|
||||
Reference in New Issue
Block a user