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
40a25bf8
Commit
40a25bf8
authored
Aug 01, 2023
by
Bruce MacDonald
Browse files
pr comments
parent
36d6081e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
cmd/cmd.go
cmd/cmd.go
+4
-1
No files found.
cmd/cmd.go
View file @
40a25bf8
...
@@ -531,6 +531,9 @@ func startMacApp(client *api.Client) error {
...
@@ -531,6 +531,9 @@ func startMacApp(client *api.Client) error {
if
err
!=
nil
{
if
err
!=
nil
{
return
err
return
err
}
}
if
!
strings
.
Contains
(
link
,
"Ollama.app"
)
{
return
fmt
.
Errorf
(
"could not find ollama app"
)
}
path
:=
strings
.
Split
(
link
,
"Ollama.app"
)
path
:=
strings
.
Split
(
link
,
"Ollama.app"
)
if
err
:=
exec
.
Command
(
"/usr/bin/open"
,
"-a"
,
path
[
0
]
+
"Ollama.app"
)
.
Run
();
err
!=
nil
{
if
err
:=
exec
.
Command
(
"/usr/bin/open"
,
"-a"
,
path
[
0
]
+
"Ollama.app"
)
.
Run
();
err
!=
nil
{
return
err
return
err
...
@@ -558,7 +561,7 @@ func checkServerHeartbeat(_ *cobra.Command, _ []string) error {
...
@@ -558,7 +561,7 @@ func checkServerHeartbeat(_ *cobra.Command, _ []string) error {
}
}
if
runtime
.
GOOS
==
"darwin"
{
if
runtime
.
GOOS
==
"darwin"
{
if
err
:=
startMacApp
(
client
);
err
!=
nil
{
if
err
:=
startMacApp
(
client
);
err
!=
nil
{
return
fmt
.
Errorf
(
"could not connect to ollama app
server, run 'ollama serve' to start it
"
)
return
fmt
.
Errorf
(
"could not connect to ollama app
, is it running?
"
)
}
}
}
else
{
}
else
{
return
fmt
.
Errorf
(
"could not connect to ollama server, run 'ollama serve' to start it"
)
return
fmt
.
Errorf
(
"could not connect to ollama server, run 'ollama serve' to start it"
)
...
...
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