| Copyright | (c) 2025 Tushar Adhatrao |
|---|---|
| License | MIT |
| Maintainer | Tushar Adhatrao <tusharadhatrao@gmail.com> |
| Stability | experimental |
| Safe Haskell | None |
| Language | Haskell2010 |
Data.Ollama.Delete
Contents
Description
This module provides functions to delete a model from the Ollama server using its name. It includes
both an IO-based function (deleteModel) and a monadic version (deleteModelM) for use in
MonadIO contexts. The delete operation is performed via a DELETE request to the "api/delete" endpoint.
Example:
>>>deleteModel "gemma3" NothingRight ()
Synopsis
- deleteModel :: Text -> Maybe OllamaConfig -> IO (Either OllamaError ())
- deleteModelM :: MonadIO m => Text -> Maybe OllamaConfig -> m (Either OllamaError ())
Delete Model API
Arguments
| :: Text | Model name to delete |
| -> Maybe OllamaConfig | Optional |
| -> IO (Either OllamaError ()) |
Deletes a model from the Ollama server.
Sends a DELETE request to the "api/delete" endpoint with the specified model name.
Returns 'Right ()' on success or Left with an OllamaError on failure.
deleteModelM :: MonadIO m => Text -> Maybe OllamaConfig -> m (Either OllamaError ()) Source #
MonadIO version of deleteModel for use in monadic contexts.
Lifts the deleteModel function into a context,
allowing it to be used in monadic computations.