mirror of
https://github.com/mudler/LocalAI.git
synced 2026-05-24 08:38:02 -04:00
feat(backends): install from local path (#5962)
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
This commit is contained in:
committed by
GitHub
parent
3d8ec72dbf
commit
a35a701052
@@ -144,6 +144,11 @@ func (u URI) LooksLikeHTTPURL() bool {
|
||||
strings.HasPrefix(string(u), HTTPSPrefix)
|
||||
}
|
||||
|
||||
func (u URI) LooksLikeDir() bool {
|
||||
f, err := os.Stat(string(u))
|
||||
return err == nil && f.IsDir()
|
||||
}
|
||||
|
||||
func (s URI) LooksLikeOCI() bool {
|
||||
return strings.HasPrefix(string(s), "quay.io") ||
|
||||
strings.HasPrefix(string(s), OCIPrefix) ||
|
||||
|
||||
Reference in New Issue
Block a user