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
5e7fd690
Commit
5e7fd690
authored
Dec 11, 2023
by
Bruce MacDonald
Committed by
Daniel Hiltgen
Dec 19, 2023
Browse files
Update images.go
parent
811b1f03
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
server/images.go
server/images.go
+5
-1
No files found.
server/images.go
View file @
5e7fd690
...
@@ -421,7 +421,11 @@ func CreateModel(ctx context.Context, name, modelFileDir string, commands []pars
...
@@ -421,7 +421,11 @@ func CreateModel(ctx context.Context, name, modelFileDir string, commands []pars
// if the model is not in gguf format, pull the base model to try and get it in gguf format
// if the model is not in gguf format, pull the base model to try and get it in gguf format
if
fromConfig
.
ModelFormat
!=
"gguf"
{
if
fromConfig
.
ModelFormat
!=
"gguf"
{
fn
(
api
.
ProgressResponse
{
Status
:
"updating base model"
})
fn
(
api
.
ProgressResponse
{
Status
:
"updating base model"
})
if
err
:=
PullModel
(
ctx
,
c
.
Args
,
&
RegistryOptions
{},
fn
);
err
!=
nil
{
parent
,
err
:=
GetModel
(
c
.
Args
)
if
err
!=
nil
{
return
err
}
if
err
:=
PullModel
(
ctx
,
parent
.
OriginalModel
,
&
RegistryOptions
{},
fn
);
err
!=
nil
{
log
.
Printf
(
"error pulling model: %v"
,
err
)
log
.
Printf
(
"error pulling model: %v"
,
err
)
}
}
// Reset the file pointer to the beginning of the file
// Reset the file pointer to the beginning of the file
...
...
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