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
8a7e2055
You need to sign in or sign up before continuing.
Unverified
Commit
8a7e2055
authored
Sep 12, 2025
by
fengyuchuanshen
Committed by
GitHub
Sep 11, 2025
Browse files
cmd: use slices.Contains to simplify code (#12249)
parent
29ddfc2c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
4 deletions
+2
-4
cmd/cmd.go
cmd/cmd.go
+2
-4
No files found.
cmd/cmd.go
View file @
8a7e2055
...
@@ -56,10 +56,8 @@ func ensureThinkingSupport(ctx context.Context, client *api.Client, name string)
...
@@ -56,10 +56,8 @@ func ensureThinkingSupport(ctx context.Context, client *api.Client, name string)
if
err
!=
nil
{
if
err
!=
nil
{
return
return
}
}
for
_
,
cap
:=
range
resp
.
Capabilities
{
if
slices
.
Contains
(
resp
.
Capabilities
,
model
.
CapabilityThinking
)
{
if
cap
==
model
.
CapabilityThinking
{
return
return
}
}
}
fmt
.
Fprintf
(
os
.
Stderr
,
"warning: model %q does not support thinking output
\n
"
,
name
)
fmt
.
Fprintf
(
os
.
Stderr
,
"warning: model %q does not support thinking output
\n
"
,
name
)
}
}
...
...
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