store

package
v0.0.0-...-b98e16c Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrModelNameEmpty = errors.New("model name is empty")
	ErrModelLocked    = errors.New("model is currently locked by another process")
)

File lock related errors

Functions

This section is empty.

Types

type Store

type Store struct {
	// contains filtered or unexported fields
}

func Get

func Get() *Store

Get returns the singleton instance of Store

func (*Store) Clean

func (s *Store) Clean() int

Clean removes all stored models and the models directory

func (*Store) Close

func (s *Store) Close() error

func (*Store) ConfigGet

func (s *Store) ConfigGet(key string) (string, error)

func (*Store) ConfigSet

func (s *Store) ConfigSet(key string, value string) error

func (*Store) DataPath

func (s *Store) DataPath() string

func (*Store) GetManifest

func (s *Store) GetManifest(name string) (*types.ModelManifest, error)

func (*Store) List

func (s *Store) List() ([]types.ModelManifest, error)

List returns all locally stored models by reading their manifest files

func (*Store) LockModel

func (s *Store) LockModel(modelName string) error

func (*Store) ModelDirPath

func (s *Store) ModelDirPath() string

func (*Store) ModelfilePath

func (s *Store) ModelfilePath(name string, file string) string

ModelfilePath returns the full path to a model's data file

func (*Store) Pull

func (s *Store) Pull(ctx context.Context, mf types.ModelManifest) (infoCh <-chan types.DownloadInfo, errCh <-chan error)

Pull downloads a model from HuggingFace and stores it locally It fetches the model tree, finds .gguf files, downloads them, and saves metadata if model not specify, all is set true, and autodetect true

func (*Store) PullExtraQuant

func (s *Store) PullExtraQuant(ctx context.Context, omf, nmf types.ModelManifest) (infoCh <-chan types.DownloadInfo, errCh <-chan error)

Pull downloads a model from HuggingFace and stores it locally It fetches the model tree, finds .gguf files, downloads them, and saves metadata if model not specify, all is set true, and autodetect true

func (*Store) Remove

func (s *Store) Remove(name string) error

Remove deletes a specific model and all its files

func (*Store) UnlockModel

func (s *Store) UnlockModel(modelName string) error

Jump to

Keyboard shortcuts

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