Copyright | (c) 2025 Tushar Adhatrao |
---|---|
License | MIT |
Maintainer | Tushar Adhatrao <[email protected]> |
Stability | experimental |
Safe Haskell | None |
Language | Haskell2010 |
Data.Ollama.Copy
Contents
Description
This module provides functions to copy a model from a source name to a destination name using the Ollama API.
It includes both an IO-based function (copyModel
) and a monadic version (copyModelM
) for use in
MonadIO
contexts. The copy operation is performed via a POST request to the "api/copy" endpoint.
Example:
>>>
copyModel "gemma3" "gemma3-copy" Nothing
Right ()
Synopsis
- copyModel :: Text -> Text -> Maybe OllamaConfig -> IO (Either OllamaError ())
- copyModelM :: MonadIO m => Text -> Text -> Maybe OllamaConfig -> m (Either OllamaError ())
Copy Model API
Arguments
:: Text | Source model name |
-> Text | Destination model name |
-> Maybe OllamaConfig | Optional |
-> IO (Either OllamaError ()) |
Copies a model from a source name to a destination name.
Sends a POST request to the "api/copy" endpoint with the source and destination model names.
Returns 'Right ()' on success or Left
with an OllamaError
on failure.
Example:
>>>
copyModel "gemma3" "gemma3-copy" Nothing
Right ()
copyModelM :: MonadIO m => Text -> Text -> Maybe OllamaConfig -> m (Either OllamaError ()) Source #