(model string)
| 134 | } |
| 135 | |
| 136 | func 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 | |
| 145 | func shouldUsePremium() bool { |
| 146 | info := GetGlobalRateLimit() |