Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
new-api
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
c81e23b0
authored
Feb 01, 2025
by
1808837298@qq.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
f*** o3-mini
parent
709dd8fc
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
4 deletions
+7
-4
common/model-ratio.go
+2
-2
controller/channel-test.go
+2
-2
relay/channel/openai/adaptor.go
+3
-0
No files found.
common/model-ratio.go
View file @
c81e23b0
...
@@ -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.5
5
,
"o1-mini-2024-09-12"
:
1.
5
,
"o1-mini-2024-09-12"
:
0.5
5
,
"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
,
...
...
controller/channel-test.go
View file @
c81e23b0
...
@@ -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
}
}
...
...
relay/channel/openai/adaptor.go
View file @
c81e23b0
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment