Documentation
¶
Overview ¶
Package hf pulls AI model artifacts from Hugging Face Hub registries.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrMultiGGUF = errors.New("multiple GGUF files require an explicit spec.files list")
ErrMultiGGUF is returned when a repository has more than one GGUF file and spec.files is empty.
Functions ¶
func ExpandFiles ¶
ExpandFiles expands spec.files against a repository listing. Exact paths must exist; globs that match nothing return an error with a hint.
func GuardMultiGGUF ¶
GuardMultiGGUF errors when more than one GGUF is present and the caller did not select files explicitly.
func ValidateFileSelection ¶
ValidateFileSelection checks Hub file-selection rules against a listing. An empty requested list triggers the multi-GGUF guard; otherwise globs and exact paths are expanded.
Types ¶
type Adapter ¶
type Adapter struct {
// HTTPClient, when set, is used instead of the registry-derived client (tests).
HTTPClient *http.Client
// RepoClass selects /api/models/ (default) or /api/datasets/. Knowledge always uses dataset.
RepoClass RepoClass
}
Adapter pulls Hugging Face Hub artifacts into {metadata.name}/content/.
type RepoClass ¶
type RepoClass string
RepoClass selects the Hub repository class (model vs dataset).
func NormalizeRepoClass ¶
NormalizeRepoClass maps an empty or unknown class to model.