1package io.github.ollama4j.utils;
3import java.io.IOException;
4import java.util.HashMap;
13 this.options =
new Options(
new HashMap<>());
24 options.getOptionsMap().put(
"mirostat", value);
37 options.getOptionsMap().put(
"mirostat_eta", value);
49 options.getOptionsMap().put(
"mirostat_tau", value);
60 options.getOptionsMap().put(
"num_ctx", value);
72 options.getOptionsMap().put(
"num_gqa", value);
84 options.getOptionsMap().put(
"num_gpu", value);
97 options.getOptionsMap().put(
"num_thread", value);
109 options.getOptionsMap().put(
"repeat_last_n", value);
121 options.getOptionsMap().put(
"repeat_penalty", value);
133 options.getOptionsMap().put(
"temperature", value);
145 options.getOptionsMap().put(
"seed", value);
158 options.getOptionsMap().put(
"stop", value);
171 options.getOptionsMap().put(
"tfs_z", value);
183 options.getOptionsMap().put(
"num_predict", value);
195 options.getOptionsMap().put(
"top_k", value);
207 options.getOptionsMap().put(
"top_p", value);
218 options.getOptionsMap().put(
"min_p", value);
230 if (!(value instanceof Integer || value instanceof Float || value instanceof String)) {
231 throw new IllegalArgumentException(
"Invalid type for parameter. Allowed types are: Integer, Float, or String.");
233 options.getOptionsMap().put(name, value);
OptionsBuilder setRepeatPenalty(float value)
OptionsBuilder setStop(String value)
OptionsBuilder setMirostatEta(float value)
OptionsBuilder setTopK(int value)
OptionsBuilder setTopP(float value)
OptionsBuilder setNumGqa(int value)
OptionsBuilder setMinP(float value)
OptionsBuilder setNumPredict(int value)
OptionsBuilder setNumCtx(int value)
OptionsBuilder setNumGpu(int value)
OptionsBuilder setTfsZ(float value)
OptionsBuilder setMirostatTau(float value)
OptionsBuilder setCustomOption(String name, Object value)
OptionsBuilder setMirostat(int value)
OptionsBuilder setSeed(int value)
OptionsBuilder setNumThread(int value)
OptionsBuilder setRepeatLastN(int value)
OptionsBuilder setTemperature(float value)