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
0625e805
Commit
0625e805
authored
Sep 26, 2023
by
Michael Yang
Browse files
fix model name not matching
parent
c38ec5be
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
6 deletions
+2
-6
cmd/cmd.go
cmd/cmd.go
+2
-6
No files found.
cmd/cmd.go
View file @
0625e805
...
...
@@ -127,13 +127,9 @@ func RunHandler(cmd *cobra.Command, args []string) error {
return
err
}
modelName
,
modelTag
,
ok
:=
strings
.
Cut
(
args
[
0
],
":"
)
if
!
ok
{
modelTag
=
"latest"
}
canonicalModelPath
:=
server
.
ParseModelPath
(
args
[
0
])
for
_
,
model
:=
range
models
.
Models
{
if
model
.
Name
==
strings
.
Join
([]
string
{
modelName
,
modelTag
},
":"
)
{
if
model
.
Name
==
canonicalModelPath
.
GetShortTagname
(
)
{
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