ollama

package
v1.69.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 7, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL