Documentation
¶
Index ¶
- func FormatBytes(bytes int64) string
- func ParseBytes(s string) (int64, error)
- type Checker
- func (c *Checker) CheckDocker() (installed bool, version string, err error)
- func (c *Checker) CheckLocalLlama() bool
- func (c *Checker) CheckOllama() bool
- func (c *Checker) CheckPort(port int) bool
- func (c *Checker) CheckRequirements(minRAM, minDisk int64) error
- func (c *Checker) GetCPU() (int, error)
- func (c *Checker) GetDisk(path string) (total, available int64, err error)
- func (c *Checker) GetRAM() (total, available int64, err error)
- func (c *Checker) GetSystemInfo() (SystemInfo, error)
- func (c *Checker) RecommendModel(models []ModelSpec, availableRAM int64) *ModelSpec
- type ModelSpec
- type SystemInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatBytes ¶
FormatBytes converts bytes to human-readable format
func ParseBytes ¶
ParseBytes converts human-readable format to bytes
Types ¶
type Checker ¶
type Checker struct {
// contains filtered or unexported fields
}
Checker implements system resource checking
func NewChecker ¶
NewChecker creates a new system checker
func (*Checker) CheckDocker ¶
CheckDocker checks if Docker is installed and returns version
func (*Checker) CheckLocalLlama ¶
CheckLocalLlama checks if LocalLlama is installed
func (*Checker) CheckOllama ¶
CheckOllama checks if Ollama is installed
func (*Checker) CheckRequirements ¶
CheckRequirements validates system meets minimum requirements
func (*Checker) GetDisk ¶
GetDisk returns total and available disk space in bytes for the given path
func (*Checker) GetSystemInfo ¶
func (c *Checker) GetSystemInfo() (SystemInfo, error)
GetSystemInfo returns comprehensive system information
type ModelSpec ¶
type ModelSpec struct {
Name string
Size int64 // Download size in bytes
MinRAM int64 // Minimum RAM required
Recommended bool // Is this the recommended model
}
ModelSpec represents an AI model specification
type SystemInfo ¶
type SystemInfo struct {
Platform string
Architecture string
TotalRAM int64
AvailableRAM int64
TotalDisk int64
AvailableDisk int64
CPUCount int
DockerInstalled bool
DockerVersion string
DockerError error
OllamaInstalled bool
LocalLlamaInstalled bool
}
SystemInfo contains comprehensive system information
Click to show internal directories.
Click to hide internal directories.