Copyright | (c) 2025 Tushar Adhatrao |
---|---|
License | MIT |
Maintainer | Tushar Adhatrao <[email protected]> |
Stability | experimental |
Safe Haskell | None |
Language | Haskell2010 |
Data.Ollama.List
Contents
Description
This module provides functions to retrieve a list of models available on the Ollama server.
It includes both an IO-based function (list
) and a monadic version (listM
) for use in
MonadIO
contexts. The list operation is performed via a GET request to the "api/tags" endpoint,
returning a Models
type containing a list of ModelInfo
records with details about each model.
Example:
>>>
list Nothing
Right (Models [ModelInfo ...])
Synopsis
- list :: Maybe OllamaConfig -> IO (Either OllamaError Models)
- listM :: MonadIO m => Maybe OllamaConfig -> m (Either OllamaError Models)
- newtype Models = Models [ModelInfo]
- data ModelInfo = ModelInfo {
- name :: !Text
- modifiedAt :: !UTCTime
- size :: !Int64
- digest :: !Text
- details :: !ModelDetails
List Models API
Arguments
:: Maybe OllamaConfig | Optional |
-> IO (Either OllamaError Models) |
Retrieves a list of available models from the Ollama server.
Sends a GET request to the "api/tags" endpoint to fetch the list of models.
Returns Right
with a Models
containing the list of ModelInfo
on success,
or Left
with an OllamaError
on failure.
listM :: MonadIO m => Maybe OllamaConfig -> m (Either OllamaError Models) Source #
Model Types
A wrapper type containing a list of available models.
Details about a specific model.
Constructors
ModelInfo | |
Fields
|