GGUFInfoGGUFInfoCMD`cmd:"" name:"gguf-info" help:"Get information about a GGUF file"`
HFScanHFScanCMD`cmd:"" name:"hf-scan" help:"Checks installed models for known security issues. WARNING: this is a best-effort feature and may not catch everything!"`
UsecaseHeuristicUsecaseHeuristicCMD`cmd:"" name:"usecase-heuristic" help:"Checks a specific model config and prints what usecase LocalAI will offer for it."`
ModelsPathstring`env:"LOCALAI_MODELS_PATH,MODELS_PATH" type:"path" default:"${basepath}/models" help:"Path containing models used for inferencing" group:"storage"`
Galleriesstring`env:"LOCALAI_GALLERIES,GALLERIES" help:"JSON list of galleries" group:"models" default:"${galleries}"`
ModelsPathstring`env:"LOCALAI_MODELS_PATH,MODELS_PATH" type:"path" default:"${basepath}/models" help:"Path containing models used for inferencing" group:"storage"`
log.Info().Msg("No security warnings were detected for your installed models. Please note that this is a BEST EFFORT tool, and all issues may not be detected.")
}else{
log.Error().Err(err).Msg("! WARNING ! A known-vulnerable model is installed!")
}
returnerr
}else{
varerrserror=nil
for_,uri:=rangehfscmd.ToScan{
log.Info().Str("uri",uri).Msg("scanning specific uri")
log.Error().Err(err).Strs("clamAV",scanResults.ClamAVInfectedFiles).Strs("pickles",scanResults.DangerousPickles).Msg("! WARNING ! A known-vulnerable model is included in this repo!")
errs=errors.Join(errs,err)
}
}
iferrs!=nil{
returnerrs
}
log.Info().Msg("No security warnings were detected for your installed models. Please note that this is a BEST EFFORT tool, and all issues may not be detected.")