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
4ad6c9b1
Unverified
Commit
4ad6c9b1
authored
Jan 04, 2024
by
Bruce MacDonald
Committed by
GitHub
Jan 04, 2024
Browse files
fix: pull either original model or from model on create (#1774)
parent
c0285158
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
server/images.go
server/images.go
+8
-2
No files found.
server/images.go
View file @
4ad6c9b1
...
...
@@ -485,9 +485,15 @@ func CreateModel(ctx context.Context, name, modelFileDir string, commands []pars
if
err
!=
nil
{
return
err
}
if
err
:=
PullModel
(
ctx
,
parent
.
OriginalModel
,
&
RegistryOptions
{},
fn
);
err
!=
nil
{
log
.
Printf
(
"error pulling model: %v"
,
err
)
originalModel
:=
parent
.
OriginalModel
if
originalModel
==
""
{
originalModel
=
parent
.
ShortName
}
if
err
:=
PullModel
(
ctx
,
originalModel
,
&
RegistryOptions
{},
fn
);
err
!=
nil
{
log
.
Printf
(
"error pulling parent model: %v"
,
err
)
}
// Reset the file pointer to the beginning of the file
_
,
err
=
fromConfigFile
.
Seek
(
0
,
0
)
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