Skip to content

Commit

Permalink
f*** o3-mini
Browse files Browse the repository at this point in the history
  • Loading branch information
Calcium-Ion committed Feb 1, 2025
1 parent 030ffd5 commit b80c1ee
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions common/model-ratio.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ var defaultModelRatio = map[string]float64{
"o1-2024-12-17": 7.5,
"o1-preview": 7.5,
"o1-preview-2024-09-12": 7.5,
"o1-mini": 1.5,
"o1-mini-2024-09-12": 1.5,
"o1-mini": 0.55,
"o1-mini-2024-09-12": 0.55,
"o3-mini": 0.55,
"o3-mini-2025-01-31": 0.55,
"gpt-4o-mini": 0.075,
Expand Down
4 changes: 2 additions & 2 deletions controller/channel-test.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,10 +156,10 @@ func buildTestRequest(model string) *dto.GeneralOpenAIRequest {
Model: "", // this will be set later
Stream: false,
}
if strings.HasPrefix(model, "o1") {
if strings.HasPrefix(model, "o1") || strings.HasPrefix(model, "o3") {
testRequest.MaxCompletionTokens = 10
} else if strings.HasPrefix(model, "gemini-2.0-flash-thinking") {
testRequest.MaxTokens = 2
testRequest.MaxTokens = 10
} else {
testRequest.MaxTokens = 1
}
Expand Down
3 changes: 3 additions & 0 deletions relay/channel/openai/adaptor.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@ func (a *Adaptor) ConvertRequest(c *gin.Context, info *relaycommon.RelayInfo, re
request.MaxCompletionTokens = request.MaxTokens
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") {
//修改第一个Message的内容,将system改为developer
Expand Down

0 comments on commit b80c1ee

Please sign in to comment.