Class OllamaModelNamesExtractor
java.lang.Object
com.developer.nefarious.zjoule.plugin.login.utils.OllamaModelNamesExtractor
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 Summary
Modifier and TypeMethodDescriptionextractModelNames
(GetOllamaModelsResponse response) Extracts model names from aGetOllamaModelsResponse
.
-
Method Details
-
extractModelNames
Extracts model names from aGetOllamaModelsResponse
.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 isnull
.
-