Class OllamaEmbeddingOptions
java.lang.Object
org.springframework.ai.ollama.api.OllamaEmbeddingOptions
- All Implemented Interfaces:
EmbeddingOptions,ModelOptions
Helper class for creating strongly-typed Ollama options.
- Since:
- 0.8.0
- Author:
- Christian Tzolov, Thomas Vitale, Ilayaperumal Gopinathan, Sebastien Deleuze
- See Also:
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedOllamaEmbeddingOptions(@Nullable String model, @Nullable String keepAlive, @Nullable Integer dimensions, @Nullable Boolean truncate, @Nullable Boolean useNUMA, @Nullable Integer numCtx, @Nullable Integer numBatch, @Nullable Integer numGPU, @Nullable Integer mainGPU, @Nullable Boolean lowVRAM, @Nullable Boolean f16KV, @Nullable Boolean logitsAll, @Nullable Boolean vocabOnly, @Nullable Boolean useMMap, @Nullable Boolean useMLock, @Nullable Integer numThread) -
Method Summary
Modifier and TypeMethodDescriptionbuilder()booleanfilterNonSupportedFields(Map<String, Object> options) Filter out the non-supported fields from the options.@Nullable Integer@Nullable BooleangetF16KV()@Nullable String@Nullable Boolean@Nullable Boolean@Nullable IntegergetModel()@Nullable Integer@Nullable Integer@Nullable Integer@Nullable Integer@Nullable Boolean@Nullable Boolean@Nullable Boolean@Nullable Boolean@Nullable BooleaninthashCode()toMap()Convert theOllamaEmbeddingOptionsobject to aMapof key/value pairs.
-
Constructor Details
-
OllamaEmbeddingOptions
protected OllamaEmbeddingOptions(@Nullable String model, @Nullable String keepAlive, @Nullable Integer dimensions, @Nullable Boolean truncate, @Nullable Boolean useNUMA, @Nullable Integer numCtx, @Nullable Integer numBatch, @Nullable Integer numGPU, @Nullable Integer mainGPU, @Nullable Boolean lowVRAM, @Nullable Boolean f16KV, @Nullable Boolean logitsAll, @Nullable Boolean vocabOnly, @Nullable Boolean useMMap, @Nullable Boolean useMLock, @Nullable Integer numThread)
-
-
Method Details
-
builder
-
filterNonSupportedFields
Filter out the non-supported fields from the options.- Parameters:
options- The options to filter.- Returns:
- The filtered options.
-
getModel
- Specified by:
getModelin interfaceEmbeddingOptions
-
getKeepAlive
-
getTruncate
-
getUseNUMA
-
getNumCtx
-
getNumBatch
-
getNumGPU
-
getMainGPU
-
getLowVRAM
-
getF16KV
-
getLogitsAll
-
getVocabOnly
-
getUseMMap
-
getUseMLock
-
getNumThread
-
getDimensions
- Specified by:
getDimensionsin interfaceEmbeddingOptions
-
toMap
Convert theOllamaEmbeddingOptionsobject to aMapof key/value pairs.- Returns:
- The
Mapof key/value pairs.
-
equals
-
hashCode
public int hashCode()
-