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
a420a453
Unverified
Commit
a420a453
authored
Jan 16, 2025
by
Patrick Devine
Committed by
GitHub
Jan 16, 2025
Browse files
fix default modelfile for create (#8452)
parent
42cf4db6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
cmd/cmd.go
cmd/cmd.go
+1
-1
cmd/cmd_test.go
cmd/cmd_test.go
+2
-2
No files found.
cmd/cmd.go
View file @
a420a453
...
...
@@ -59,7 +59,7 @@ func getModelfileName(cmd *cobra.Command) (string, error) {
_
,
err
=
os
.
Stat
(
absName
)
if
err
!=
nil
{
return
filename
,
err
return
""
,
err
}
return
absName
,
nil
...
...
cmd/cmd_test.go
View file @
a420a453
...
...
@@ -279,7 +279,7 @@ func TestGetModelfileName(t *testing.T) {
name
:
"no modelfile specified, no modelfile exists"
,
modelfileName
:
""
,
fileExists
:
false
,
expectedName
:
"
Modelfile
"
,
expectedName
:
""
,
expectedErr
:
os
.
ErrNotExist
,
},
{
...
...
@@ -293,7 +293,7 @@ func TestGetModelfileName(t *testing.T) {
name
:
"modelfile specified, no modelfile exists"
,
modelfileName
:
"crazyfile"
,
fileExists
:
false
,
expectedName
:
"
crazyfile
"
,
expectedName
:
""
,
expectedErr
:
os
.
ErrNotExist
,
},
{
...
...
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