MCPcopy
hub / github.com/wavetermdev/waveterm / shouldUseChatCompletionsAPI

Function shouldUseChatCompletionsAPI

pkg/aiusechat/usechat.go:136–143  ·  view source on GitHub ↗
(model string)

Source from the content-addressed store, hash-verified

134}
135
136func shouldUseChatCompletionsAPI(model string) bool {
137 m := strings.ToLower(model)
138 // Chat Completions API is required for older models: gpt-3.5-*, gpt-4, gpt-4-turbo, o1-*
139 return strings.HasPrefix(m, "gpt-3.5") ||
140 strings.HasPrefix(m, "gpt-4-") ||
141 m == "gpt-4" ||
142 strings.HasPrefix(m, "o1-")
143}
144
145func shouldUsePremium() bool {
146 info := GetGlobalRateLimit()

Callers 1

runAIChatStepFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected