Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PullChunk ¶
type PullChunk struct {
Status string `json:"status"`
Digest string `json:"digest"`
Total int64 `json:"total"`
Completed int64 `json:"completed"`
Error string `json:"error"` // Ollama streams errors in this field
}
PullChunk is a single progress update from the Ollama pull API.
type PullScanner ¶
type PullScanner struct {
// contains filtered or unexported fields
}
PullScanner wraps the streaming response from the Ollama pull API.
func PullModel ¶
func PullModel(ctx context.Context, baseURL, model string) (*PullScanner, error)
PullModel initiates a model pull via the Ollama native API at baseURL. The baseURL should be the Ollama server root (e.g. "http://localhost:11434").
func (*PullScanner) Next ¶
func (ps *PullScanner) Next() (*PullChunk, error)
Next returns the next progress chunk, or nil at EOF.
Click to show internal directories.
Click to hide internal directories.