mirror of
https://github.com/likelovewant/ollama-for-amd.git
synced 2025-12-21 22:33:56 +00:00
cmd: use slices.Contains to simplify code (#12249)
This commit is contained in:
@@ -56,11 +56,9 @@ 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)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user