mirror of
https://github.com/mudler/LocalAI.git
synced 2026-10-22 22:34:35 -04:00
feat(backends): install from local path (#5962)
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
This commit is contained in:
1 parent
3d8ec72dbf
commit
a35a701052
5 files changed
+43
-66
No files matched your search
@@ -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