Ollama4j
A Java library (wrapper/binding) for Ollama server.
Loading...
Searching...
No Matches
OllamaEmbedRequestBuilder.java
Go to the documentation of this file.
1
package
io.github.ollama4j.models.embeddings;
2
3
import
io.github.ollama4j.utils.Options;
4
5
import
java.util.List;
6
10
public
class
OllamaEmbedRequestBuilder
{
11
12
private
final
OllamaEmbedRequestModel
request;
13
14
private
OllamaEmbedRequestBuilder
(String model, List<String> input) {
15
this.request =
new
OllamaEmbedRequestModel
(model,input);
16
}
17
18
public
static
OllamaEmbedRequestBuilder
getInstance
(String model, String... input){
19
return
new
OllamaEmbedRequestBuilder
(model, List.of(input));
20
}
21
22
public
OllamaEmbedRequestBuilder
withOptions
(
Options
options){
23
this.request.setOptions(options.getOptionsMap());
24
return
this
;
25
}
26
27
public
OllamaEmbedRequestBuilder
withKeepAlive
(String keepAlive){
28
this.request.setKeepAlive(keepAlive);
29
return
this
;
30
}
31
32
public
OllamaEmbedRequestBuilder
withoutTruncate
(){
33
this.request.setTruncate(
false
);
34
return
this
;
35
}
36
37
public
OllamaEmbedRequestModel
build
() {
38
return
this.request;
39
}
40
}
io.github.ollama4j.models.embeddings.OllamaEmbedRequestBuilder
Definition
OllamaEmbedRequestBuilder.java:10
io.github.ollama4j.models.embeddings.OllamaEmbedRequestBuilder.getInstance
static OllamaEmbedRequestBuilder getInstance(String model, String... input)
Definition
OllamaEmbedRequestBuilder.java:18
io.github.ollama4j.models.embeddings.OllamaEmbedRequestBuilder.build
OllamaEmbedRequestModel build()
Definition
OllamaEmbedRequestBuilder.java:37
io.github.ollama4j.models.embeddings.OllamaEmbedRequestBuilder.withKeepAlive
OllamaEmbedRequestBuilder withKeepAlive(String keepAlive)
Definition
OllamaEmbedRequestBuilder.java:27
io.github.ollama4j.models.embeddings.OllamaEmbedRequestBuilder.withOptions
OllamaEmbedRequestBuilder withOptions(Options options)
Definition
OllamaEmbedRequestBuilder.java:22
io.github.ollama4j.models.embeddings.OllamaEmbedRequestBuilder.withoutTruncate
OllamaEmbedRequestBuilder withoutTruncate()
Definition
OllamaEmbedRequestBuilder.java:32
io.github.ollama4j.models.embeddings.OllamaEmbedRequestModel
Definition
OllamaEmbedRequestModel.java:18
io.github.ollama4j.utils.Options
Definition
Options.java:8
src
main
java
io
github
ollama4j
models
embeddings
OllamaEmbedRequestBuilder.java
Generated by
1.12.0