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
orangecat
ollama
Commits
3a9f4471
"vscode:/vscode.git/clone" did not exist on "948b5a5c74fbfdeb6e071254e510624f4fcd208c"
Unverified
Commit
3a9f4471
authored
Jan 05, 2024
by
Bruce MacDonald
Committed by
GitHub
Jan 05, 2024
Browse files
only pull gguf model if already exists (#1817)
parent
9c2941e6
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
12 deletions
+13
-12
cmd/cmd.go
cmd/cmd.go
+13
-12
No files found.
cmd/cmd.go
View file @
3a9f4471
...
@@ -158,9 +158,9 @@ func RunHandler(cmd *cobra.Command, args []string) error {
...
@@ -158,9 +158,9 @@ func RunHandler(cmd *cobra.Command, args []string) error {
}
}
case
err
!=
nil
:
case
err
!=
nil
:
return
err
return
err
}
default
:
// the model was found, check if it is in the correct format
if
model
.
Details
.
Format
!=
"gguf"
{
if
model
.
Details
.
Format
!=
""
&&
model
.
Details
.
Format
!=
"gguf"
{
// pull and retry to see if the model has been updated
// pull and retry to see if the model has been updated
parts
:=
strings
.
Split
(
name
,
string
(
os
.
PathSeparator
))
parts
:=
strings
.
Split
(
name
,
string
(
os
.
PathSeparator
))
if
len
(
parts
)
==
1
{
if
len
(
parts
)
==
1
{
...
@@ -172,6 +172,7 @@ func RunHandler(cmd *cobra.Command, args []string) error {
...
@@ -172,6 +172,7 @@ func RunHandler(cmd *cobra.Command, args []string) error {
return
fmt
.
Errorf
(
"unsupported model, please update this model to gguf format"
)
// relay the original error
return
fmt
.
Errorf
(
"unsupported model, please update this model to gguf format"
)
// relay the original error
}
}
}
}
}
return
RunGenerate
(
cmd
,
args
)
return
RunGenerate
(
cmd
,
args
)
}
}
...
...
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