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
ec361481
Unverified
Commit
ec361481
authored
Nov 01, 2023
by
Michael Yang
Committed by
GitHub
Nov 01, 2023
Browse files
Merge pull request #960 from jmorganca/mxyng/fix-tautology
parents
f1496931
bf6786bb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
8 deletions
+6
-8
cmd/cmd.go
cmd/cmd.go
+6
-8
No files found.
cmd/cmd.go
View file @
ec361481
...
...
@@ -102,16 +102,14 @@ func RunHandler(cmd *cobra.Command, args []string) error {
name
:=
args
[
0
]
// check if the model exists on the server
_
,
err
=
client
.
Show
(
context
.
Background
(),
&
api
.
ShowRequest
{
Name
:
name
})
if
err
!=
nil
{
var
statusError
api
.
StatusError
switch
{
case
errors
.
As
(
err
,
&
statusError
)
&&
statusError
.
StatusCode
==
http
.
StatusNotFound
:
if
err
:=
PullHandler
(
cmd
,
args
);
err
!=
nil
{
return
err
}
case
err
!=
nil
:
var
statusError
api
.
StatusError
switch
{
case
errors
.
As
(
err
,
&
statusError
)
&&
statusError
.
StatusCode
==
http
.
StatusNotFound
:
if
err
:=
PullHandler
(
cmd
,
args
);
err
!=
nil
{
return
err
}
case
err
!=
nil
:
return
err
}
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