Class OllamaEmbeddingOptions

java.lang.Object
org.springframework.ai.ollama.api.OllamaEmbeddingOptions
All Implemented Interfaces:
EmbeddingOptions, ModelOptions

public class OllamaEmbeddingOptions extends Object implements EmbeddingOptions
Helper class for creating strongly-typed Ollama options.
Since:
0.8.0
Author:
Christian Tzolov, Thomas Vitale, Ilayaperumal Gopinathan, Sebastien Deleuze
See Also:
  • Constructor Details

  • Method Details

    • builder

      public static OllamaEmbeddingOptions.Builder builder()
    • filterNonSupportedFields

      public static Map<String,Object> filterNonSupportedFields(Map<String,Object> options)
      Filter out the non-supported fields from the options.
      Parameters:
      options - The options to filter.
      Returns:
      The filtered options.
    • getModel

      public String getModel()
      Specified by:
      getModel in interface EmbeddingOptions
    • getKeepAlive

      public @Nullable String getKeepAlive()
    • getTruncate

      public @Nullable Boolean getTruncate()
    • getUseNUMA

      public @Nullable Boolean getUseNUMA()
    • getNumCtx

      public @Nullable Integer getNumCtx()
    • getNumBatch

      public @Nullable Integer getNumBatch()
    • getNumGPU

      public @Nullable Integer getNumGPU()
    • getMainGPU

      public @Nullable Integer getMainGPU()
    • getLowVRAM

      public @Nullable Boolean getLowVRAM()
    • getF16KV

      public @Nullable Boolean getF16KV()
    • getLogitsAll

      public @Nullable Boolean getLogitsAll()
    • getVocabOnly

      public @Nullable Boolean getVocabOnly()
    • getUseMMap

      public @Nullable Boolean getUseMMap()
    • getUseMLock

      public @Nullable Boolean getUseMLock()
    • getNumThread

      public @Nullable Integer getNumThread()
    • getDimensions

      public @Nullable Integer getDimensions()
      Specified by:
      getDimensions in interface EmbeddingOptions
    • toMap

      public Map<String,Object> toMap()
      Convert the OllamaEmbeddingOptions object to a Map of key/value pairs.
      Returns:
      The Map of key/value pairs.
    • equals

      public boolean equals(@Nullable Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object