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
d1c098b0
Commit
d1c098b0
authored
Jul 31, 2023
by
Bruce MacDonald
Browse files
tell users to check the server error logs
parent
90ba0b80
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
1 deletion
+12
-1
cmd/cmd.go
cmd/cmd.go
+12
-1
No files found.
cmd/cmd.go
View file @
d1c098b0
...
...
@@ -278,6 +278,18 @@ func generate(cmd *cobra.Command, model, prompt string) error {
}
if
err
:=
client
.
Generate
(
context
.
Background
(),
&
request
,
fn
);
err
!=
nil
{
if
strings
.
Contains
(
err
.
Error
(),
"failed to load model"
)
{
// tell the user to check the server log, if it exists locally
home
,
nestedErr
:=
os
.
UserHomeDir
()
if
nestedErr
!=
nil
{
// return the original error
return
err
}
logPath
:=
filepath
.
Join
(
home
,
".ollama"
,
"logs"
,
"server.log"
)
if
_
,
nestedErr
:=
os
.
Stat
(
logPath
);
nestedErr
==
nil
{
err
=
fmt
.
Errorf
(
"%w
\n
For more details, check the error logs at %s"
,
err
,
logPath
)
}
}
return
err
}
...
...
@@ -431,7 +443,6 @@ func generateInteractive(cmd *cobra.Command, model string) error {
usage
()
continue
}
}
else
{
usage
()
continue
...
...
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