Builder
public static final class Builder
io/agentscope/extensions/model/ollama/options/OllamaOptions.java:1162–1349构建器,用于构建并配置目标实例。位于 io.agentscope.extensions.model.ollama.options 包。核心成员包括 model、format、keepAlive、truncate、executionConfig、useNUMA。
A class in io.agentscope.extensions.model.ollama.options that talks to model services and returns generated or embedded output. Declared in io.agentscope.extensions.model.ollama.options.
方法摘要Method Summary
方法详情Method Detail
model
public Builder model(String model)
设置模型。
Performs the model operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
model | String | 模型实例(类型 `String`)。The model. |
Builderio/agentscope/extensions/model/ollama/options/OllamaOptions.java:1166–1169format
public Builder format(Object format)
设置格式。
Performs the format operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
format | Object | 格式(类型 `Object`)。The format. |
Builderio/agentscope/extensions/model/ollama/options/OllamaOptions.java:1171–1174keepAlive
public Builder keepAlive(String keepAlive)
设置该配置项。
Performs the keep alive operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
keepAlive | String | keep Alive(类型 `String`)。The keep alive. |
Builderio/agentscope/extensions/model/ollama/options/OllamaOptions.java:1176–1179truncate
public Builder truncate(Boolean truncate)
设置该配置项。
Performs the truncate operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
truncate | Boolean | truncate(类型 `Boolean`)。The truncate. |
Builderio/agentscope/extensions/model/ollama/options/OllamaOptions.java:1181–1184executionConfig
public Builder executionConfig(ExecutionConfig executionConfig)
设置执行配置。
Performs the execution config operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
executionConfig | ExecutionConfig | 执行配置(类型 `ExecutionConfig`)。The execution config. |
Builderio/agentscope/extensions/model/ollama/options/OllamaOptions.java:1186–1189useNUMA
public Builder useNUMA(Boolean useNUMA)
设置使用 NUMA。
Performs the use NUMA operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
useNUMA | Boolean | 使用 NUMA(类型 `Boolean`)。The use NUMA. |
Builderio/agentscope/extensions/model/ollama/options/OllamaOptions.java:1191–1194numCtx
public Builder numCtx(Integer numCtx)
设置该配置项。
Performs the num ctx operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
numCtx | Integer | num Ctx(类型 `Integer`)。The num ctx. |
Builderio/agentscope/extensions/model/ollama/options/OllamaOptions.java:1196–1199numBatch
public Builder numBatch(Integer numBatch)
设置该配置项。
Performs the num batch operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
numBatch | Integer | num Batch(类型 `Integer`)。The num batch. |
Builderio/agentscope/extensions/model/ollama/options/OllamaOptions.java:1201–1204numGPU
public Builder numGPU(Integer numGPU)
设置该配置项。
Performs the num GPU operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
numGPU | Integer | num GPU(类型 `Integer`)。The num GPU. |
Builderio/agentscope/extensions/model/ollama/options/OllamaOptions.java:1206–1209mainGPU
public Builder mainGPU(Integer mainGPU)
设置主 GPU。
Performs the main GPU operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
mainGPU | Integer | 主 GPU(类型 `Integer`)。The main GPU. |
Builderio/agentscope/extensions/model/ollama/options/OllamaOptions.java:1211–1214lowVRAM
public Builder lowVRAM(Boolean lowVRAM)
设置该配置项。
Performs the low VRAM operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
lowVRAM | Boolean | low VRAM(类型 `Boolean`)。The low VRAM. |
Builderio/agentscope/extensions/model/ollama/options/OllamaOptions.java:1216–1219f16KV
public Builder f16KV(Boolean f16KV)
设置f 16 KV。
Performs the f 16 KV operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
f16KV | Boolean | f 16 KV(类型 `Boolean`)。The f 16 KV. |
Builderio/agentscope/extensions/model/ollama/options/OllamaOptions.java:1221–1224logitsAll
public Builder logitsAll(Boolean logitsAll)
设置该配置项。
Performs the logits all operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
logitsAll | Boolean | logits 所有(类型 `Boolean`)。The logits all. |
Builderio/agentscope/extensions/model/ollama/options/OllamaOptions.java:1226–1229vocabOnly
public Builder vocabOnly(Boolean vocabOnly)
设置该配置项。
Performs the vocab only operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
vocabOnly | Boolean | vocab Only(类型 `Boolean`)。The vocab only. |
Builderio/agentscope/extensions/model/ollama/options/OllamaOptions.java:1231–1234useMMap
public Builder useMMap(Boolean useMMap)
设置使用 M 映射。
Performs the use m map operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
useMMap | Boolean | 使用 M 映射(类型 `Boolean`)。The use m map. |
Builderio/agentscope/extensions/model/ollama/options/OllamaOptions.java:1236–1239useMLock
public Builder useMLock(Boolean useMLock)
设置使用 M 锁。
Performs the use m lock operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
useMLock | Boolean | 使用 M 锁(类型 `Boolean`)。The use m lock. |
Builderio/agentscope/extensions/model/ollama/options/OllamaOptions.java:1241–1244numThread
public Builder numThread(Integer numThread)
设置该配置项。
Performs the num thread operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
numThread | Integer | num 会话线程(类型 `Integer`)。The num thread. |
Builderio/agentscope/extensions/model/ollama/options/OllamaOptions.java:1246–1249numKeep
public Builder numKeep(Integer numKeep)
设置该配置项。
Performs the num keep operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
numKeep | Integer | num Keep(类型 `Integer`)。The num keep. |
Builderio/agentscope/extensions/model/ollama/options/OllamaOptions.java:1251–1254seed
public Builder seed(Integer seed)
设置预置。
Performs the seed operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
seed | Integer | 预置(类型 `Integer`)。The seed. |
Builderio/agentscope/extensions/model/ollama/options/OllamaOptions.java:1256–1259numPredict
public Builder numPredict(Integer numPredict)
设置该配置项。
Performs the num predict operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
numPredict | Integer | num Predict(类型 `Integer`)。The num predict. |
Builderio/agentscope/extensions/model/ollama/options/OllamaOptions.java:1261–1264topK
public Builder topK(Integer topK)
设置该配置项。
Performs the top k operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
topK | Integer | top K(类型 `Integer`)。The top k. |
Builderio/agentscope/extensions/model/ollama/options/OllamaOptions.java:1266–1269topP
public Builder topP(Double topP)
设置该配置项。
Performs the top p operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
topP | Double | top P(类型 `Double`)。The top p. |
Builderio/agentscope/extensions/model/ollama/options/OllamaOptions.java:1271–1274minP
public Builder minP(Double minP)
设置最小 P。
Performs the min p operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
minP | Double | 最小 P(类型 `Double`)。The min p. |
Builderio/agentscope/extensions/model/ollama/options/OllamaOptions.java:1276–1279tfsZ
public Builder tfsZ(Float tfsZ)
设置该配置项。
Performs the tfs z operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
tfsZ | Float | tfs Z(类型 `Float`)。The tfs z. |
Builderio/agentscope/extensions/model/ollama/options/OllamaOptions.java:1281–1284typicalP
public Builder typicalP(Float typicalP)
设置该配置项。
Performs the typical p operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
typicalP | Float | typical P(类型 `Float`)。The typical p. |
Builderio/agentscope/extensions/model/ollama/options/OllamaOptions.java:1286–1289repeatLastN
public Builder repeatLastN(Integer repeatLastN)
设置该配置项。
Performs the repeat last n operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
repeatLastN | Integer | repeat 最后 N(类型 `Integer`)。The repeat last n. |
Builderio/agentscope/extensions/model/ollama/options/OllamaOptions.java:1291–1294temperature
public Builder temperature(Double temperature)
设置该配置项。
Performs the temperature operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
temperature | Double | temperature(类型 `Double`)。The temperature. |
Builderio/agentscope/extensions/model/ollama/options/OllamaOptions.java:1296–1299repeatPenalty
public Builder repeatPenalty(Double repeatPenalty)
设置该配置项。
Performs the repeat penalty operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
repeatPenalty | Double | repeat Penalty(类型 `Double`)。The repeat penalty. |
Builderio/agentscope/extensions/model/ollama/options/OllamaOptions.java:1301–1304presencePenalty
public Builder presencePenalty(Double presencePenalty)
设置该配置项。
Performs the presence penalty operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
presencePenalty | Double | 在线状态 Penalty(类型 `Double`)。The presence penalty. |
Builderio/agentscope/extensions/model/ollama/options/OllamaOptions.java:1306–1309frequencyPenalty
public Builder frequencyPenalty(Double frequencyPenalty)
设置该配置项。
Performs the frequency penalty operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
frequencyPenalty | Double | frequency Penalty(类型 `Double`)。The frequency penalty. |
Builderio/agentscope/extensions/model/ollama/options/OllamaOptions.java:1311–1314mirostat
public Builder mirostat(Integer mirostat)
设置该配置项。
Performs the mirostat operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
mirostat | Integer | mirostat(类型 `Integer`)。The mirostat. |
Builderio/agentscope/extensions/model/ollama/options/OllamaOptions.java:1316–1319mirostatTau
public Builder mirostatTau(Float mirostatTau)
设置该配置项。
Performs the mirostat tau operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
mirostatTau | Float | mirostat Tau(类型 `Float`)。The mirostat tau. |
Builderio/agentscope/extensions/model/ollama/options/OllamaOptions.java:1321–1324mirostatEta
public Builder mirostatEta(Float mirostatEta)
设置该配置项。
Performs the mirostat eta operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
mirostatEta | Float | mirostat Eta(类型 `Float`)。The mirostat eta. |
Builderio/agentscope/extensions/model/ollama/options/OllamaOptions.java:1326–1329penalizeNewline
public Builder penalizeNewline(Boolean penalizeNewline)
设置该配置项。
Performs the penalize newline operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
penalizeNewline | Boolean | penalize Newline(类型 `Boolean`)。The penalize newline. |
Builderio/agentscope/extensions/model/ollama/options/OllamaOptions.java:1331–1334stop
public Builder stop(List<String> stop)
设置停止。
Performs the stop operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
stop | List<String> | 停止(类型 `List`)。The stop. |
Builderio/agentscope/extensions/model/ollama/options/OllamaOptions.java:1336–1339thinkOption
public Builder thinkOption(ThinkOption thinkOption)
设置该配置项。
Performs the think option operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
thinkOption | ThinkOption | think 选项(类型 `ThinkOption`)。The think option. |
Builderio/agentscope/extensions/model/ollama/options/OllamaOptions.java:1341–1344build
public OllamaOptions build()
构建并返回最终实例。
Creates and returns an instance.
OllamaOptionsio/agentscope/extensions/model/ollama/options/OllamaOptions.java:1346–1348