| Copyright | (c) 2025 Tushar Adhatrao |
|---|---|
| License | MIT |
| Maintainer | Tushar Adhatrao <tusharadhatrao@gmail.com> |
| Stability | experimental |
| Safe Haskell | None |
| Language | Haskell2010 |
Data.Ollama.Push
Contents
Description
This module provides functions to push (upload) a model to the Ollama server. It includes both an IO-based function (push) and a monadic version (pushM) for use in MonadIO contexts. The push operation is performed via a POST request to the /api/pull endpoint, with support for streaming progress updates and insecure connections.
The PushOps type configures the push request, and PushResp represents the response containing the status and progress details. Streaming mode, when enabled, provides real-time progress updates by printing to the console.
Example:
>>>push "gemma3" Nothing (Just True) NothingPushing... Completed
Push Model API
Arguments
| :: Text | Model name |
| -> Maybe Bool | Optional insecure connection flag |
| -> Maybe Bool | Optional streaming flag |
| -> Maybe OllamaConfig | Optional |
| -> IO () |
Pushes a model to the Ollama server with specified options.
Sends a POST request to the /api/pull endpoint to upload the specified model. Supports streaming progress updates (if stream is 'Just True') and insecure connections (if insecure is 'Just True'). Prints "Pushing..." during streaming and Completed when finished. Returns () on completion.