mirror of
https://github.com/songquanpeng/one-api.git
synced 2025-09-17 17:16:38 +08:00
feat: add support for new OpenAI models and update billing ratios
This commit is contained in:
parent
7c8628bd95
commit
8cd1db4e99
@ -20,4 +20,7 @@ var ModelList = []string{
|
|||||||
"dall-e-2", "dall-e-3",
|
"dall-e-2", "dall-e-3",
|
||||||
"whisper-1",
|
"whisper-1",
|
||||||
"tts-1", "tts-1-1106", "tts-1-hd", "tts-1-hd-1106",
|
"tts-1", "tts-1-1106", "tts-1-hd", "tts-1-hd-1106",
|
||||||
|
"o1", "o1-2024-12-17",
|
||||||
|
"o1-preview", "o1-preview-2024-09-12",
|
||||||
|
"o1-mini", "o1-mini-2024-09-12",
|
||||||
}
|
}
|
||||||
|
@ -48,6 +48,12 @@ var ModelRatio = map[string]float64{
|
|||||||
"gpt-3.5-turbo-instruct": 0.75, // $0.0015 / 1K tokens
|
"gpt-3.5-turbo-instruct": 0.75, // $0.0015 / 1K tokens
|
||||||
"gpt-3.5-turbo-1106": 0.5, // $0.001 / 1K tokens
|
"gpt-3.5-turbo-1106": 0.5, // $0.001 / 1K tokens
|
||||||
"gpt-3.5-turbo-0125": 0.25, // $0.0005 / 1K tokens
|
"gpt-3.5-turbo-0125": 0.25, // $0.0005 / 1K tokens
|
||||||
|
"o1": 7.5, // $15.00 / 1M input tokens
|
||||||
|
"o1-2024-12-17": 7.5,
|
||||||
|
"o1-preview": 7.5, // $15.00 / 1M input tokens
|
||||||
|
"o1-preview-2024-09-12": 7.5,
|
||||||
|
"o1-mini": 1.5, // $3.00 / 1M input tokens
|
||||||
|
"o1-mini-2024-09-12": 1.5,
|
||||||
"davinci-002": 1, // $0.002 / 1K tokens
|
"davinci-002": 1, // $0.002 / 1K tokens
|
||||||
"babbage-002": 0.2, // $0.0004 / 1K tokens
|
"babbage-002": 0.2, // $0.0004 / 1K tokens
|
||||||
"text-ada-001": 0.2,
|
"text-ada-001": 0.2,
|
||||||
@ -344,6 +350,10 @@ func GetCompletionRatio(name string, channelType int) float64 {
|
|||||||
}
|
}
|
||||||
return 2
|
return 2
|
||||||
}
|
}
|
||||||
|
// including o1, o1-preview, o1-mini
|
||||||
|
if strings.HasPrefix(name, "o1") {
|
||||||
|
return 4
|
||||||
|
}
|
||||||
if name == "chatgpt-4o-latest" {
|
if name == "chatgpt-4o-latest" {
|
||||||
return 3
|
return 3
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user