scanner

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ModelFileExtensions = []string{
	".gguf",
	".ggml",
	".safetensors",
	".ckpt",
	".pt",
	".pth",
	".bin",
	".h5",
	".pb",
	".onnx",
}

ModelFileExtensions are file extensions we recognize as model files

Functions

This section is empty.

Types

type ScanResult

type ScanResult struct {
	FilesScanned  int
	ModelsFound   int
	ModelsAdded   int
	ModelsSkipped int
	Errors        []error
}

ScanResult contains information about a scan operation

type Scanner

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

Scanner scans directories for model files and populates metadata

func NewScanner

func NewScanner(db *state.DB) *Scanner

NewScanner creates a new directory scanner

func (*Scanner) ScanDirectories

func (s *Scanner) ScanDirectories(dirs []string) (*ScanResult, error)

ScanDirectories scans multiple directories for model files

func (*Scanner) ScanWithProgress

func (s *Scanner) ScanWithProgress(dirs []string, progressFn func(path string, found int)) (*ScanResult, error)

ScanWithProgress scans directories and calls progress callback

Jump to

Keyboard shortcuts

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