Class OllamaModelNamesExtractor

java.lang.Object
com.developer.nefarious.zjoule.plugin.login.utils.OllamaModelNamesExtractor

public abstract class OllamaModelNamesExtractor extends Object
A utility class for extracting Ollama model names from API responses.

The OllamaModelNamesExtractor provides a static method to convert a GetOllamaModelsResponse into a list of model names. This helps in populating dropdown menus or other UI components with available models.

  • Method Details

    • extractModelNames

      public static List<String> extractModelNames(GetOllamaModelsResponse response)
      Extracts model names from a GetOllamaModelsResponse.

      This method retrieves the list of OllamaModel objects from the response and extracts their names into a list of strings.

      Parameters:
      response - the API response containing Ollama models.
      Returns:
      a list of model names, or null if the response is null.