feat: add gpt-4.5-preview models (#947)

This commit is contained in:
Liu Shuang
2025-03-04 16:26:59 +08:00
committed by GitHub
parent 261721bfdb
commit 74d6449f22

View File

@@ -10,41 +10,43 @@ import (
// GPT3 Models are designed for text-based tasks. For code-specific // GPT3 Models are designed for text-based tasks. For code-specific
// tasks, please refer to the Codex series of models. // tasks, please refer to the Codex series of models.
const ( const (
O1Mini = "o1-mini" O1Mini = "o1-mini"
O1Mini20240912 = "o1-mini-2024-09-12" O1Mini20240912 = "o1-mini-2024-09-12"
O1Preview = "o1-preview" O1Preview = "o1-preview"
O1Preview20240912 = "o1-preview-2024-09-12" O1Preview20240912 = "o1-preview-2024-09-12"
O1 = "o1" O1 = "o1"
O120241217 = "o1-2024-12-17" O120241217 = "o1-2024-12-17"
O3Mini = "o3-mini" O3Mini = "o3-mini"
O3Mini20250131 = "o3-mini-2025-01-31" O3Mini20250131 = "o3-mini-2025-01-31"
GPT432K0613 = "gpt-4-32k-0613" GPT432K0613 = "gpt-4-32k-0613"
GPT432K0314 = "gpt-4-32k-0314" GPT432K0314 = "gpt-4-32k-0314"
GPT432K = "gpt-4-32k" GPT432K = "gpt-4-32k"
GPT40613 = "gpt-4-0613" GPT40613 = "gpt-4-0613"
GPT40314 = "gpt-4-0314" GPT40314 = "gpt-4-0314"
GPT4o = "gpt-4o" GPT4o = "gpt-4o"
GPT4o20240513 = "gpt-4o-2024-05-13" GPT4o20240513 = "gpt-4o-2024-05-13"
GPT4o20240806 = "gpt-4o-2024-08-06" GPT4o20240806 = "gpt-4o-2024-08-06"
GPT4o20241120 = "gpt-4o-2024-11-20" GPT4o20241120 = "gpt-4o-2024-11-20"
GPT4oLatest = "chatgpt-4o-latest" GPT4oLatest = "chatgpt-4o-latest"
GPT4oMini = "gpt-4o-mini" GPT4oMini = "gpt-4o-mini"
GPT4oMini20240718 = "gpt-4o-mini-2024-07-18" GPT4oMini20240718 = "gpt-4o-mini-2024-07-18"
GPT4Turbo = "gpt-4-turbo" GPT4Turbo = "gpt-4-turbo"
GPT4Turbo20240409 = "gpt-4-turbo-2024-04-09" GPT4Turbo20240409 = "gpt-4-turbo-2024-04-09"
GPT4Turbo0125 = "gpt-4-0125-preview" GPT4Turbo0125 = "gpt-4-0125-preview"
GPT4Turbo1106 = "gpt-4-1106-preview" GPT4Turbo1106 = "gpt-4-1106-preview"
GPT4TurboPreview = "gpt-4-turbo-preview" GPT4TurboPreview = "gpt-4-turbo-preview"
GPT4VisionPreview = "gpt-4-vision-preview" GPT4VisionPreview = "gpt-4-vision-preview"
GPT4 = "gpt-4" GPT4 = "gpt-4"
GPT3Dot5Turbo0125 = "gpt-3.5-turbo-0125" GPT4Dot5Preview = "gpt-4.5-preview"
GPT3Dot5Turbo1106 = "gpt-3.5-turbo-1106" GPT4Dot5Preview20250227 = "gpt-4.5-preview-2025-02-27"
GPT3Dot5Turbo0613 = "gpt-3.5-turbo-0613" GPT3Dot5Turbo0125 = "gpt-3.5-turbo-0125"
GPT3Dot5Turbo0301 = "gpt-3.5-turbo-0301" GPT3Dot5Turbo1106 = "gpt-3.5-turbo-1106"
GPT3Dot5Turbo16K = "gpt-3.5-turbo-16k" GPT3Dot5Turbo0613 = "gpt-3.5-turbo-0613"
GPT3Dot5Turbo16K0613 = "gpt-3.5-turbo-16k-0613" GPT3Dot5Turbo0301 = "gpt-3.5-turbo-0301"
GPT3Dot5Turbo = "gpt-3.5-turbo" GPT3Dot5Turbo16K = "gpt-3.5-turbo-16k"
GPT3Dot5TurboInstruct = "gpt-3.5-turbo-instruct" GPT3Dot5Turbo16K0613 = "gpt-3.5-turbo-16k-0613"
GPT3Dot5Turbo = "gpt-3.5-turbo"
GPT3Dot5TurboInstruct = "gpt-3.5-turbo-instruct"
// Deprecated: Model is shutdown. Use gpt-3.5-turbo-instruct instead. // Deprecated: Model is shutdown. Use gpt-3.5-turbo-instruct instead.
GPT3TextDavinci003 = "text-davinci-003" GPT3TextDavinci003 = "text-davinci-003"
// Deprecated: Model is shutdown. Use gpt-3.5-turbo-instruct instead. // Deprecated: Model is shutdown. Use gpt-3.5-turbo-instruct instead.
@@ -85,38 +87,40 @@ const (
var disabledModelsForEndpoints = map[string]map[string]bool{ var disabledModelsForEndpoints = map[string]map[string]bool{
"/completions": { "/completions": {
O1Mini: true, O1Mini: true,
O1Mini20240912: true, O1Mini20240912: true,
O1Preview: true, O1Preview: true,
O1Preview20240912: true, O1Preview20240912: true,
O3Mini: true, O3Mini: true,
O3Mini20250131: true, O3Mini20250131: true,
GPT3Dot5Turbo: true, GPT3Dot5Turbo: true,
GPT3Dot5Turbo0301: true, GPT3Dot5Turbo0301: true,
GPT3Dot5Turbo0613: true, GPT3Dot5Turbo0613: true,
GPT3Dot5Turbo1106: true, GPT3Dot5Turbo1106: true,
GPT3Dot5Turbo0125: true, GPT3Dot5Turbo0125: true,
GPT3Dot5Turbo16K: true, GPT3Dot5Turbo16K: true,
GPT3Dot5Turbo16K0613: true, GPT3Dot5Turbo16K0613: true,
GPT4: true, GPT4: true,
GPT4o: true, GPT4Dot5Preview: true,
GPT4o20240513: true, GPT4Dot5Preview20250227: true,
GPT4o20240806: true, GPT4o: true,
GPT4o20241120: true, GPT4o20240513: true,
GPT4oLatest: true, GPT4o20240806: true,
GPT4oMini: true, GPT4o20241120: true,
GPT4oMini20240718: true, GPT4oLatest: true,
GPT4TurboPreview: true, GPT4oMini: true,
GPT4VisionPreview: true, GPT4oMini20240718: true,
GPT4Turbo1106: true, GPT4TurboPreview: true,
GPT4Turbo0125: true, GPT4VisionPreview: true,
GPT4Turbo: true, GPT4Turbo1106: true,
GPT4Turbo20240409: true, GPT4Turbo0125: true,
GPT40314: true, GPT4Turbo: true,
GPT40613: true, GPT4Turbo20240409: true,
GPT432K: true, GPT40314: true,
GPT432K0314: true, GPT40613: true,
GPT432K0613: true, GPT432K: true,
GPT432K0314: true,
GPT432K0613: true,
}, },
chatCompletionsSuffix: { chatCompletionsSuffix: {
CodexCodeDavinci002: true, CodexCodeDavinci002: true,