Interface IOllamaLoginClient
- All Known Implementing Classes:
OllamaLoginClient
public interface IOllamaLoginClient
A client interface for handling Ollama login-related API interactions.
The OllamaLoginClient
communicates with the Ollama API to retrieve
available models. It uses an HttpClient
for HTTP requests and
an IOllamaLoginClientHelper
for handling request construction and response parsing.
-
Method Summary
Modifier and TypeMethodDescriptionRetrieves the available Ollama models from the specified endpoint.
-
Method Details
-
getModels
Retrieves the available Ollama models from the specified endpoint.This method sends a GET request to the Ollama API's `/api/tags` endpoint and parses the response into a
GetOllamaModelsResponse
object.- Parameters:
endpoint
- the base URL of the Ollama API.- Returns:
- a
GetOllamaModelsResponse
containing the list of available models. - Throws:
IOException
- if an I/O error occurs while sending the request.InterruptedException
- if the request is interrupted while waiting for a response.
-