Documentation
¶
Index ¶
- Variables
- type Store
- func (s *Store) Clean() int
- func (s *Store) Close() error
- func (s *Store) ConfigGet(key string) (string, error)
- func (s *Store) ConfigSet(key string, value string) error
- func (s *Store) DataPath() string
- func (s *Store) GetManifest(name string) (*types.ModelManifest, error)
- func (s *Store) List() ([]types.ModelManifest, error)
- func (s *Store) LockModel(modelName string) error
- func (s *Store) ModelDirPath() string
- func (s *Store) ModelfilePath(name string, file string) string
- func (s *Store) Pull(ctx context.Context, mf types.ModelManifest) (infoCh <-chan types.DownloadInfo, errCh <-chan error)
- func (s *Store) PullExtraQuant(ctx context.Context, omf, nmf types.ModelManifest) (infoCh <-chan types.DownloadInfo, errCh <-chan error)
- func (s *Store) Remove(name string) error
- func (s *Store) UnlockModel(modelName string) error
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 (*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) ModelDirPath ¶
func (*Store) ModelfilePath ¶
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) UnlockModel ¶
Click to show internal directories.
Click to hide internal directories.