Class OllamaConfig

java.lang.Object
org.vrspace.server.config.OllamaConfig

@ConditionalOnProperty(name="org.vrspace.ollama.enabled", havingValue="true") @Configuration public class OllamaConfig extends Object
Ollama configuration, loaded from properties file. Available only if org.vrspace.ollama.enabled is true.
Author:
joe
  • Constructor Details

    • OllamaConfig

      public OllamaConfig()
  • Method Details

    • getUrl

      public String getUrl()
      Defaults to http://localhost:11434
    • getVisionModel

      public String getVisionModel()
      Value of org.vrspace.ollama.model.vision property, defaults to ministral-3:3b
    • getToolsModel

      public String getToolsModel()
      Value of org.vrspace.ollama.model.tools property, defaults to ministral-3:3b
    • getContextWindowSize

      public int getContextWindowSize()
      Value of org.vrspace.ollama.contextWindowSize property, defaults to 65536 (roughly 11GB VRAM with 3b model)
    • getKeepAlive

      public String getKeepAlive()
      How long to keep the model in VRAM, -1 means forever, but must have duration
    • getMemorySize

      public int getMemorySize()
      Value of org.vrspace.ollama.memorySize, defaults to 11 (5x query+response and 1x system message)
    • getVisionPrompt

      public String getVisionPrompt()
    • getDescriptionRemove

      public Pattern getDescriptionRemove()
    • getDescriptionReplace

      public Pattern getDescriptionReplace()
    • getFail

      public Pattern getFail()
    • setUrl

      public void setUrl(String url)
      Defaults to http://localhost:11434
    • setVisionModel

      public void setVisionModel(String visionModel)
      Value of org.vrspace.ollama.model.vision property, defaults to ministral-3:3b
    • setToolsModel

      public void setToolsModel(String toolsModel)
      Value of org.vrspace.ollama.model.tools property, defaults to ministral-3:3b
    • setContextWindowSize

      public void setContextWindowSize(int contextWindowSize)
      Value of org.vrspace.ollama.contextWindowSize property, defaults to 65536 (roughly 11GB VRAM with 3b model)
    • setKeepAlive

      public void setKeepAlive(String keepAlive)
      How long to keep the model in VRAM, -1 means forever, but must have duration
    • setMemorySize

      public void setMemorySize(int memorySize)
      Value of org.vrspace.ollama.memorySize, defaults to 11 (5x query+response and 1x system message)
    • setVisionPrompt

      public void setVisionPrompt(String visionPrompt)
    • setDescriptionRemove

      public void setDescriptionRemove(Pattern descriptionRemove)
    • setDescriptionReplace

      public void setDescriptionReplace(Pattern descriptionReplace)
    • setFail

      public void setFail(Pattern fail)
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object