mirror of
https://github.com/CJackHwang/ds2api.git
synced 2026-05-06 09:25:27 +08:00
20 lines
490 B
Go
20 lines
490 B
Go
package openai
|
|
|
|
import "strings"
|
|
|
|
func (h *Handler) toolcallFeatureMatchEnabled() bool {
|
|
if h == nil || h.Store == nil {
|
|
return true
|
|
}
|
|
mode := strings.TrimSpace(strings.ToLower(h.Store.ToolcallMode()))
|
|
return mode == "" || mode == "feature_match"
|
|
}
|
|
|
|
func (h *Handler) toolcallEarlyEmitHighConfidence() bool {
|
|
if h == nil || h.Store == nil {
|
|
return true
|
|
}
|
|
level := strings.TrimSpace(strings.ToLower(h.Store.ToolcallEarlyEmitConfidence()))
|
|
return level == "" || level == "high"
|
|
}
|