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
f89fc1ca
Unverified
Commit
f89fc1ca
authored
Nov 05, 2025
by
Patrick Devine
Committed by
GitHub
Nov 05, 2025
Browse files
bugfix: show connection string for interactive cli usage (#12930)
parent
97e05d2a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
cmd/cmd.go
cmd/cmd.go
+8
-8
No files found.
cmd/cmd.go
View file @
f89fc1ca
...
...
@@ -284,6 +284,14 @@ func loadOrUnloadModel(cmd *cobra.Command, opts *runOptions) error {
return
err
}
else
if
info
.
RemoteHost
!=
""
{
// Cloud model, no need to load/unload
if
opts
.
ShowConnect
{
p
.
StopAndClear
()
if
strings
.
HasPrefix
(
info
.
RemoteHost
,
"https://ollama.com"
)
{
fmt
.
Fprintf
(
os
.
Stderr
,
"Connecting to '%s' on 'ollama.com' ⚡
\n
"
,
info
.
RemoteModel
)
}
else
{
fmt
.
Fprintf
(
os
.
Stderr
,
"Connecting to '%s' on '%s'
\n
"
,
info
.
RemoteModel
,
info
.
RemoteHost
)
}
}
return
nil
}
...
...
@@ -296,14 +304,6 @@ func loadOrUnloadModel(cmd *cobra.Command, opts *runOptions) error {
}
return
client
.
Generate
(
cmd
.
Context
(),
req
,
func
(
r
api
.
GenerateResponse
)
error
{
if
r
.
RemoteModel
!=
""
&&
opts
.
ShowConnect
{
p
.
StopAndClear
()
if
strings
.
HasPrefix
(
r
.
RemoteHost
,
"https://ollama.com"
)
{
fmt
.
Fprintf
(
os
.
Stderr
,
"Connecting to '%s' on 'ollama.com' ⚡
\n
"
,
r
.
RemoteModel
)
}
else
{
fmt
.
Fprintf
(
os
.
Stderr
,
"Connecting to '%s' on '%s'
\n
"
,
r
.
RemoteModel
,
r
.
RemoteHost
)
}
}
return
nil
})
}
...
...
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