Class OllamaOptions
java.lang.Object
org.springframework.ai.ollama.api.OllamaOptions
- All Implemented Interfaces:
ChatOptions,EmbeddingOptions,ModelOptions,ToolCallingChatOptions
@Deprecated
public class OllamaOptions
extends Object
implements ToolCallingChatOptions, EmbeddingOptions
Deprecated.
use OllamaChatOptions or OllamaEmbeddingOptions instead.
Helper class for creating strongly-typed Ollama options.
- Since:
- 0.8.0
- Author:
- Christian Tzolov, Thomas Vitale, Ilayaperumal Gopinathan
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from interface org.springframework.ai.model.tool.ToolCallingChatOptions
DEFAULT_TOOL_EXECUTION_ENABLED -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic OllamaOptions.Builderbuilder()Deprecated.A builder to create a newToolCallingChatOptionsinstance.copy()Deprecated.Returns a copy of thisChatOptions.booleanDeprecated.filterNonSupportedFields(Map<String, Object> options) Deprecated.Filter out the non-supported fields from the options.static OllamaOptionsfromOptions(OllamaOptions fromOptions) Deprecated.Deprecated.getF16KV()Deprecated.Not supported in Ollama anymore.Deprecated.Deprecated.Returns the frequency penalty to use for the chat.Deprecated.Whether theChatModelis responsible for executing the tools requested by the model or if the tools should be executed directly by the caller.Deprecated.Deprecated.Not supported in Ollama anymore.Deprecated.Not supported in Ollama anymore.Deprecated.Deprecated.Returns the maximum number of tokens to use for the chat.getMinP()Deprecated.Deprecated.Not supported in Ollama anymore.Deprecated.Not supported in Ollama anymore.Deprecated.Not supported in Ollama anymore.getModel()Deprecated.Returns the model to use for the chat.Deprecated.Deprecated.Deprecated.Deprecated.Deprecated.Deprecated.Deprecated.Not supported in Ollama anymore.Deprecated.Returns the presence penalty to use for the chat.Deprecated.Deprecated.getSeed()Deprecated.getStop()Deprecated.Deprecated.Returns the stop sequences to use for the chat.Deprecated.Returns the temperature to use for the chat.getTfsZ()Deprecated.Not supported in Ollama anymore.Deprecated.ToolCallbacks to be registered with the ChatModel.Deprecated.Get the configured tool context.Deprecated.Names of the tools to register with the ChatModel.getTopK()Deprecated.Returns the top K to use for the chat.getTopP()Deprecated.Returns the top P to use for the chat.Deprecated.Deprecated.Deprecated.Not supported in Ollama anymore.Deprecated.Deprecated.Not supported in Ollama anymore.Deprecated.Not supported in Ollama anymore.inthashCode()Deprecated.voidDeprecated.Not supported in Ollama anymore.voidDeprecated.voidsetFrequencyPenalty(Double frequencyPenalty) Deprecated.voidsetInternalToolExecutionEnabled(Boolean internalToolExecutionEnabled) Deprecated.Set whether theChatModelis responsible for executing the tools requested by the model or if the tools should be executed directly by the caller.voidsetKeepAlive(String keepAlive) Deprecated.voidsetLogitsAll(Boolean logitsAll) Deprecated.Not supported in Ollama anymore.voidsetLowVRAM(Boolean lowVRAM) Deprecated.Not supported in Ollama anymore.voidsetMainGPU(Integer mainGPU) Deprecated.voidsetMaxTokens(Integer maxTokens) Deprecated.voidDeprecated.voidsetMirostat(Integer mirostat) Deprecated.Not supported in Ollama anymore.voidsetMirostatEta(Float mirostatEta) Deprecated.Not supported in Ollama anymore.voidsetMirostatTau(Float mirostatTau) Deprecated.Not supported in Ollama anymore.voidDeprecated.voidsetNumBatch(Integer numBatch) Deprecated.voidDeprecated.voidDeprecated.voidsetNumKeep(Integer numKeep) Deprecated.voidsetNumPredict(Integer numPredict) Deprecated.voidsetNumThread(Integer numThread) Deprecated.voidsetPenalizeNewline(Boolean penalizeNewline) Deprecated.Not supported in Ollama anymore.voidsetPresencePenalty(Double presencePenalty) Deprecated.voidsetRepeatLastN(Integer repeatLastN) Deprecated.voidsetRepeatPenalty(Double repeatPenalty) Deprecated.voidDeprecated.voidDeprecated.voidsetStopSequences(List<String> stopSequences) Deprecated.voidsetTemperature(Double temperature) Deprecated.voidDeprecated.Not supported in Ollama anymore.voidsetToolCallbacks(List<ToolCallback> toolCallbacks) Deprecated.Set the ToolCallbacks to be registered with the ChatModel.voidsetToolContext(Map<String, Object> toolContext) Deprecated.Set the tool context values as map.voidsetToolNames(Set<String> toolNames) Deprecated.Set the names of the tools to register with the ChatModel.voidDeprecated.voidDeprecated.voidsetTruncate(Boolean truncate) Deprecated.voidsetTypicalP(Float typicalP) Deprecated.voidsetUseMLock(Boolean useMLock) Deprecated.Not supported in Ollama anymore.voidsetUseMMap(Boolean useMMap) Deprecated.voidsetUseNUMA(Boolean useNUMA) Deprecated.Not supported in Ollama anymore.voidsetVocabOnly(Boolean vocabOnly) Deprecated.Not supported in Ollama anymore.toMap()Deprecated.Convert theOllamaOptionsobject to aMapof key/value pairs.
-
Constructor Details
-
OllamaOptions
public OllamaOptions()Deprecated.
-
-
Method Details
-
builder
Deprecated.Description copied from interface:ToolCallingChatOptionsA builder to create a newToolCallingChatOptionsinstance.- Returns:
- Returns a new
ChatOptions.Builder.
-
filterNonSupportedFields
Deprecated.Filter out the non-supported fields from the options.- Parameters:
options- The options to filter.- Returns:
- The filtered options.
-
fromOptions
Deprecated. -
getModel
Deprecated.Description copied from interface:ChatOptionsReturns the model to use for the chat.- Specified by:
getModelin interfaceChatOptions- Specified by:
getModelin interfaceEmbeddingOptions- Returns:
- the model to use for the chat
-
setModel
Deprecated. -
getFormat
Deprecated. -
setFormat
Deprecated. -
getKeepAlive
Deprecated. -
setKeepAlive
Deprecated. -
getUseNUMA
Deprecated.Not supported in Ollama anymore. -
setUseNUMA
Deprecated.Not supported in Ollama anymore. -
getNumCtx
Deprecated. -
setNumCtx
Deprecated. -
getNumBatch
Deprecated. -
setNumBatch
Deprecated. -
getNumGPU
Deprecated. -
setNumGPU
Deprecated. -
getMainGPU
Deprecated. -
setMainGPU
Deprecated. -
getLowVRAM
Deprecated.Not supported in Ollama anymore. -
setLowVRAM
Deprecated.Not supported in Ollama anymore. -
getF16KV
Deprecated.Not supported in Ollama anymore. -
setF16KV
Deprecated.Not supported in Ollama anymore. -
getLogitsAll
Deprecated.Not supported in Ollama anymore. -
setLogitsAll
Deprecated.Not supported in Ollama anymore. -
getVocabOnly
Deprecated.Not supported in Ollama anymore. -
setVocabOnly
Deprecated.Not supported in Ollama anymore. -
getUseMMap
Deprecated. -
setUseMMap
Deprecated. -
getUseMLock
Deprecated.Not supported in Ollama anymore. -
setUseMLock
Deprecated.Not supported in Ollama anymore. -
getNumThread
Deprecated. -
setNumThread
Deprecated. -
getNumKeep
Deprecated. -
setNumKeep
Deprecated. -
getSeed
Deprecated. -
setSeed
Deprecated. -
getMaxTokens
Deprecated.Description copied from interface:ChatOptionsReturns the maximum number of tokens to use for the chat.- Specified by:
getMaxTokensin interfaceChatOptions- Returns:
- the maximum number of tokens to use for the chat
-
setMaxTokens
Deprecated. -
getNumPredict
Deprecated. -
setNumPredict
Deprecated. -
getTopK
Deprecated.Description copied from interface:ChatOptionsReturns the top K to use for the chat.- Specified by:
getTopKin interfaceChatOptions- Returns:
- the top K to use for the chat
-
setTopK
Deprecated. -
getTopP
Deprecated.Description copied from interface:ChatOptionsReturns the top P to use for the chat.- Specified by:
getTopPin interfaceChatOptions- Returns:
- the top P to use for the chat
-
setTopP
Deprecated. -
getMinP
Deprecated. -
setMinP
Deprecated. -
getTfsZ
Deprecated.Not supported in Ollama anymore. -
setTfsZ
Deprecated.Not supported in Ollama anymore. -
getTypicalP
Deprecated. -
setTypicalP
Deprecated. -
getRepeatLastN
Deprecated. -
setRepeatLastN
Deprecated. -
getTemperature
Deprecated.Description copied from interface:ChatOptionsReturns the temperature to use for the chat.- Specified by:
getTemperaturein interfaceChatOptions- Returns:
- the temperature to use for the chat
-
setTemperature
Deprecated. -
getRepeatPenalty
Deprecated. -
setRepeatPenalty
Deprecated. -
getPresencePenalty
Deprecated.Description copied from interface:ChatOptionsReturns the presence penalty to use for the chat.- Specified by:
getPresencePenaltyin interfaceChatOptions- Returns:
- the presence penalty to use for the chat
-
setPresencePenalty
Deprecated. -
getFrequencyPenalty
Deprecated.Description copied from interface:ChatOptionsReturns the frequency penalty to use for the chat.- Specified by:
getFrequencyPenaltyin interfaceChatOptions- Returns:
- the frequency penalty to use for the chat
-
setFrequencyPenalty
Deprecated. -
getMirostat
Deprecated.Not supported in Ollama anymore. -
setMirostat
Deprecated.Not supported in Ollama anymore. -
getMirostatTau
Deprecated.Not supported in Ollama anymore. -
setMirostatTau
Deprecated.Not supported in Ollama anymore. -
getMirostatEta
Deprecated.Not supported in Ollama anymore. -
setMirostatEta
Deprecated.Not supported in Ollama anymore. -
getPenalizeNewline
Deprecated.Not supported in Ollama anymore. -
setPenalizeNewline
Deprecated.Not supported in Ollama anymore. -
getStopSequences
Deprecated.Description copied from interface:ChatOptionsReturns the stop sequences to use for the chat.- Specified by:
getStopSequencesin interfaceChatOptions- Returns:
- the stop sequences to use for the chat
-
setStopSequences
Deprecated. -
getStop
Deprecated. -
setStop
Deprecated. -
getTruncate
Deprecated. -
setTruncate
Deprecated. -
getToolCallbacks
Deprecated.Description copied from interface:ToolCallingChatOptionsToolCallbacks to be registered with the ChatModel.- Specified by:
getToolCallbacksin interfaceToolCallingChatOptions
-
setToolCallbacks
Deprecated.Description copied from interface:ToolCallingChatOptionsSet the ToolCallbacks to be registered with the ChatModel.- Specified by:
setToolCallbacksin interfaceToolCallingChatOptions
-
getToolNames
Deprecated.Description copied from interface:ToolCallingChatOptionsNames of the tools to register with the ChatModel.- Specified by:
getToolNamesin interfaceToolCallingChatOptions
-
setToolNames
Deprecated.Description copied from interface:ToolCallingChatOptionsSet the names of the tools to register with the ChatModel.- Specified by:
setToolNamesin interfaceToolCallingChatOptions
-
getInternalToolExecutionEnabled
Deprecated.Description copied from interface:ToolCallingChatOptionsWhether theChatModelis responsible for executing the tools requested by the model or if the tools should be executed directly by the caller.- Specified by:
getInternalToolExecutionEnabledin interfaceToolCallingChatOptions
-
setInternalToolExecutionEnabled
Deprecated.Description copied from interface:ToolCallingChatOptionsSet whether theChatModelis responsible for executing the tools requested by the model or if the tools should be executed directly by the caller.- Specified by:
setInternalToolExecutionEnabledin interfaceToolCallingChatOptions
-
getDimensions
Deprecated.- Specified by:
getDimensionsin interfaceEmbeddingOptions
-
getToolContext
Deprecated.Description copied from interface:ToolCallingChatOptionsGet the configured tool context.- Specified by:
getToolContextin interfaceToolCallingChatOptions- Returns:
- the tool context map.
-
setToolContext
Deprecated.Description copied from interface:ToolCallingChatOptionsSet the tool context values as map.- Specified by:
setToolContextin interfaceToolCallingChatOptions- Parameters:
toolContext- as map
-
toMap
Deprecated.Convert theOllamaOptionsobject to aMapof key/value pairs.- Returns:
- The
Mapof key/value pairs.
-
copy
Deprecated.Description copied from interface:ChatOptionsReturns a copy of thisChatOptions.- Specified by:
copyin interfaceChatOptions- Returns:
- a copy of this
ChatOptions
-
equals
Deprecated. -
hashCode
public int hashCode()Deprecated.
-