Commit c81e23b0 by 1808837298@qq.com

f*** o3-mini

parent 709dd8fc
...@@ -54,8 +54,8 @@ var defaultModelRatio = map[string]float64{ ...@@ -54,8 +54,8 @@ var defaultModelRatio = map[string]float64{
"o1-2024-12-17": 7.5, "o1-2024-12-17": 7.5,
"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,
"o1-mini-2024-09-12": 1.5, "o1-mini-2024-09-12": 0.55,
"o3-mini": 0.55, "o3-mini": 0.55,
"o3-mini-2025-01-31": 0.55, "o3-mini-2025-01-31": 0.55,
"gpt-4o-mini": 0.075, "gpt-4o-mini": 0.075,
......
...@@ -156,10 +156,10 @@ func buildTestRequest(model string) *dto.GeneralOpenAIRequest { ...@@ -156,10 +156,10 @@ func buildTestRequest(model string) *dto.GeneralOpenAIRequest {
Model: "", // this will be set later Model: "", // this will be set later
Stream: false, Stream: false,
} }
if strings.HasPrefix(model, "o1") { if strings.HasPrefix(model, "o1") || strings.HasPrefix(model, "o3") {
testRequest.MaxCompletionTokens = 10 testRequest.MaxCompletionTokens = 10
} else if strings.HasPrefix(model, "gemini-2.0-flash-thinking") { } else if strings.HasPrefix(model, "gemini-2.0-flash-thinking") {
testRequest.MaxTokens = 2 testRequest.MaxTokens = 10
} else { } else {
testRequest.MaxTokens = 1 testRequest.MaxTokens = 1
} }
......
...@@ -114,6 +114,9 @@ func (a *Adaptor) ConvertRequest(c *gin.Context, info *relaycommon.RelayInfo, re ...@@ -114,6 +114,9 @@ func (a *Adaptor) ConvertRequest(c *gin.Context, info *relaycommon.RelayInfo, re
request.MaxCompletionTokens = request.MaxTokens request.MaxCompletionTokens = request.MaxTokens
request.MaxTokens = 0 request.MaxTokens = 0
} }
if strings.HasPrefix(request.Model, "o3") {
request.Temperature = nil
}
} }
if request.Model == "o1" || request.Model == "o1-2024-12-17" || strings.HasPrefix(request.Model, "o3") { if request.Model == "o1" || request.Model == "o1-2024-12-17" || strings.HasPrefix(request.Model, "o3") {
//修改第一个Message的内容,将system改为developer //修改第一个Message的内容,将system改为developer
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment