mirror of
https://github.com/linux-do/new-api.git
synced 2025-11-11 16:43:41 +08:00
update for o3
Signed-off-by: wozulong <>
This commit is contained in:
@@ -34,14 +34,16 @@ var defaultModelRatio = map[string]float64{
|
|||||||
"gpt-4o-mini": 0.075, // $0.00015 / 1K tokens
|
"gpt-4o-mini": 0.075, // $0.00015 / 1K tokens
|
||||||
"gpt-4o-mini-2024-07-18": 0.075,
|
"gpt-4o-mini-2024-07-18": 0.075,
|
||||||
"chatgpt-4o-latest": 2.5, // $0.01 / 1K tokens
|
"chatgpt-4o-latest": 2.5, // $0.01 / 1K tokens
|
||||||
"gpt-4o": 2.5, // $0.005 / 1K tokens
|
"gpt-4o": 1.25, // $0.005 / 1K tokens
|
||||||
"gpt-4o-2024-05-13": 2.5, // $0.005 / 1K tokens
|
"gpt-4o-2024-05-13": 2.5, // $0.005 / 1K tokens
|
||||||
"gpt-4o-2024-08-06": 1.25, // $0.01 / 1K tokens
|
"gpt-4o-2024-08-06": 1.25, // $0.01 / 1K tokens
|
||||||
"gpt-4o-2024-11-20": 1.25, // $0.01 / 1K tokens
|
"gpt-4o-2024-11-20": 1.25, // $0.01 / 1K tokens
|
||||||
"o1-preview": 7.5,
|
"o1-preview": 7.5,
|
||||||
"o1-preview-2024-09-12": 7.5,
|
"o1-preview-2024-09-12": 7.5,
|
||||||
"o1-mini": 1.5,
|
"o1-mini": 0.55, // $0.0011 / 1K tokens
|
||||||
"o1-mini-2024-09-12": 1.5,
|
"o1-mini-2024-09-12": 0.55,
|
||||||
|
"o3-mini": 0.55,
|
||||||
|
"o3-mini-2025-01-31": 0.55,
|
||||||
"gpt-4-turbo": 5, // $0.01 / 1K tokens
|
"gpt-4-turbo": 5, // $0.01 / 1K tokens
|
||||||
"gpt-4-turbo-2024-04-09": 5, // $0.01 / 1K tokens
|
"gpt-4-turbo-2024-04-09": 5, // $0.01 / 1K tokens
|
||||||
"gpt-4-1106-preview": 5, // $0.01 / 1K tokens
|
"gpt-4-1106-preview": 5, // $0.01 / 1K tokens
|
||||||
@@ -365,6 +367,9 @@ func GetCompletionRatio(name string) float64 {
|
|||||||
if "o1" == name || strings.HasPrefix(name, "o1-") {
|
if "o1" == name || strings.HasPrefix(name, "o1-") {
|
||||||
return 4
|
return 4
|
||||||
}
|
}
|
||||||
|
if "o3" == name || strings.HasPrefix(name, "o3-") {
|
||||||
|
return 4
|
||||||
|
}
|
||||||
if name == "chatgpt-4o-latest" {
|
if name == "chatgpt-4o-latest" {
|
||||||
return 3
|
return 3
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import "encoding/json"
|
|||||||
|
|
||||||
type GeneralOpenAIRequest struct {
|
type GeneralOpenAIRequest struct {
|
||||||
Model string `json:"model,omitempty"`
|
Model string `json:"model,omitempty"`
|
||||||
|
ReasoningEffort string `json:"reasoning_effort,omitempty"`
|
||||||
Messages []Message `json:"messages,omitempty"`
|
Messages []Message `json:"messages,omitempty"`
|
||||||
Prompt any `json:"prompt,omitempty"`
|
Prompt any `json:"prompt,omitempty"`
|
||||||
BestOf int `json:"best_of,omitempty"`
|
BestOf int `json:"best_of,omitempty"`
|
||||||
@@ -33,7 +34,7 @@ type GeneralOpenAIRequest struct {
|
|||||||
LogProbs any `json:"logprobs,omitempty"`
|
LogProbs any `json:"logprobs,omitempty"`
|
||||||
TopLogProbs int `json:"top_logprobs,omitempty"`
|
TopLogProbs int `json:"top_logprobs,omitempty"`
|
||||||
Dimensions int `json:"dimensions,omitempty"`
|
Dimensions int `json:"dimensions,omitempty"`
|
||||||
ParallelToolCalls bool `json:"parallel_Tool_Calls,omitempty"`
|
ParallelToolCalls bool `json:"parallel_tool_calls,omitempty"`
|
||||||
EncodingFormat any `json:"encoding_format,omitempty"`
|
EncodingFormat any `json:"encoding_format,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user