Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
ollama
Commits
0cebc79c
Unverified
Commit
0cebc79c
authored
Mar 08, 2024
by
Bruce MacDonald
Committed by
GitHub
Mar 08, 2024
Browse files
fix: allow importing a model from name reference (#3005)
parent
0e4669b0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
server/images.go
server/images.go
+4
-0
No files found.
server/images.go
View file @
0cebc79c
...
...
@@ -10,6 +10,7 @@ import (
"errors"
"fmt"
"io"
"io/fs"
"log"
"log/slog"
"net/http"
...
...
@@ -322,9 +323,12 @@ func CreateModel(ctx context.Context, name, modelFileDir string, commands []pars
ggufName
,
err
:=
convertSafetensors
(
name
,
pathName
)
if
err
!=
nil
{
var
pathErr
*
fs
.
PathError
switch
{
case
errors
.
Is
(
err
,
zip
.
ErrFormat
)
:
// it's not a safetensor archive
case
errors
.
As
(
err
,
&
pathErr
)
:
// it's not a file on disk, could be a model reference
default
:
return
err
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment