Class Ollama4jService

java.lang.Object
com.bytedesk.ai.provider.vendors.ollama.Ollama4jService

@Service public class Ollama4jService extends Object
  • Field Details

    • ollama4jApi

      @Autowired @Qualifier("ollama4jApi") private io.github.ollama4j.OllamaAPI ollama4jApi
  • Constructor Details

    • Ollama4jService

      public Ollama4jService()
  • Method Details

    • isOllama4jReachable

      public boolean isOllama4jReachable()
    • getLocalModels

      public List<io.github.ollama4j.models.response.Model> getLocalModels()
    • getModels

      public List<io.github.ollama4j.models.response.LibraryModel> getModels()
    • getPs

      public io.github.ollama4j.models.ps.ModelsProcessResponse getPs()
    • getModelDetails

      public io.github.ollama4j.models.response.LibraryModelDetail getModelDetails(io.github.ollama4j.models.response.LibraryModel model)
    • getModelDetails

      public io.github.ollama4j.models.response.ModelDetail getModelDetails(String ollamaModelType)
      https://ollama4j.github.io/ollama4j/apis-model-management/get-model-details
      Parameters:
      OllamaModelType -
      Returns:
    • getModelTag

      public io.github.ollama4j.models.response.LibraryModelTag getModelTag(String model, String tag)
    • pullModel

      public void pullModel(io.github.ollama4j.models.response.LibraryModelTag libraryModelTag)
    • pullModel

      public void pullModel(String ollamaModelType)
    • deleteModel

      public void deleteModel(String model)