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
86d93c46
authored
Feb 11, 2025
by
1808837298@qq.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: adjust max tokens configuration in test request builder
- Update max tokens default value to 10
parent
93511cfb
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 additions
and
3 deletions
+1
-3
controller/channel-test.go
+1
-3
No files found.
controller/channel-test.go
View file @
86d93c46
...
@@ -158,10 +158,8 @@ func buildTestRequest(model string) *dto.GeneralOpenAIRequest {
...
@@ -158,10 +158,8 @@ func buildTestRequest(model string) *dto.GeneralOpenAIRequest {
}
}
if
strings
.
HasPrefix
(
model
,
"o1"
)
||
strings
.
HasPrefix
(
model
,
"o3"
)
{
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"
)
{
testRequest
.
MaxTokens
=
10
}
else
{
}
else
{
testRequest
.
MaxTokens
=
1
testRequest
.
MaxTokens
=
1
0
}
}
content
,
_
:=
json
.
Marshal
(
"hi"
)
content
,
_
:=
json
.
Marshal
(
"hi"
)
testMessage
:=
dto
.
Message
{
testMessage
:=
dto
.
Message
{
...
...
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