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
68d7255b
Unverified
Commit
68d7255b
authored
Oct 16, 2023
by
Bruce MacDonald
Committed by
GitHub
Oct 16, 2023
Browse files
show request to server rather than local check (#778)
parent
9ef2fce3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
cmd/cmd.go
cmd/cmd.go
+6
-1
No files found.
cmd/cmd.go
View file @
68d7255b
...
...
@@ -688,7 +688,12 @@ func generateInteractive(cmd *cobra.Command, model string) error {
case
strings
.
HasPrefix
(
line
,
"/show"
)
:
args
:=
strings
.
Fields
(
line
)
if
len
(
args
)
>
1
{
resp
,
err
:=
server
.
GetModelInfo
(
model
)
client
,
err
:=
api
.
ClientFromEnvironment
()
if
err
!=
nil
{
fmt
.
Println
(
"error: couldn't connect to ollama server"
)
return
err
}
resp
,
err
:=
client
.
Show
(
cmd
.
Context
(),
&
api
.
ShowRequest
{
Name
:
model
})
if
err
!=
nil
{
fmt
.
Println
(
"error: couldn't get model"
)
return
err
...
...
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