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
bb80a597
Commit
bb80a597
authored
Dec 01, 2023
by
Joshua Pham
Browse files
Fix adapter loading from SHA hash
parent
6681d378
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
server/images.go
server/images.go
+9
-0
No files found.
server/images.go
View file @
bb80a597
...
@@ -375,6 +375,15 @@ func CreateModel(ctx context.Context, name, modelFileDir string, commands []pars
...
@@ -375,6 +375,15 @@ func CreateModel(ctx context.Context, name, modelFileDir string, commands []pars
layer
.
MediaType
=
mediatype
layer
.
MediaType
=
mediatype
layers
=
append
(
layers
,
layer
)
layers
=
append
(
layers
,
layer
)
case
"adapter"
:
case
"adapter"
:
if
strings
.
HasPrefix
(
c
.
Args
,
"@"
)
{
blobPath
,
err
:=
GetBlobsPath
(
strings
.
TrimPrefix
(
c
.
Args
,
"@"
))
if
err
!=
nil
{
return
err
}
c
.
Args
=
blobPath
}
fn
(
api
.
ProgressResponse
{
Status
:
"creating adapter layer"
})
fn
(
api
.
ProgressResponse
{
Status
:
"creating adapter layer"
})
bin
,
err
:=
os
.
Open
(
realpath
(
modelFileDir
,
c
.
Args
))
bin
,
err
:=
os
.
Open
(
realpath
(
modelFileDir
,
c
.
Args
))
if
err
!=
nil
{
if
err
!=
nil
{
...
...
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