modelref

package
v0.33.1 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrConflictingSourceSuffix = errors.New("use either :local or :cloud, not both")
	ErrModelRequired           = errors.New("model is required")
)

Functions

func HasExplicitCloudSource

func HasExplicitCloudSource(raw string) bool

func HasExplicitLocalSource

func HasExplicitLocalSource(raw string) bool

func HasExplicitTag added in v0.32.6

func HasExplicitTag(name string) bool

HasExplicitTag reports whether name contains an explicit tag (e.g. "model:8b"), as opposed to relying on the default tag. Colons in a registry host (e.g. "registry.example.com:5000/model") don't count.

func NormalizePullName

func NormalizePullName(raw string) (string, bool, error)

func StripCloudSourceTag

func StripCloudSourceTag(raw string) (string, bool)

Types

type ModelSource

type ModelSource uint8
const (
	ModelSourceUnspecified ModelSource = iota
	ModelSourceLocal
	ModelSourceCloud
)

type ParsedRef

type ParsedRef struct {
	Original string
	Base     string
	Source   ModelSource
}

func ParseRef

func ParseRef(raw string) (ParsedRef, error)

Jump to

Keyboard shortcuts

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