mirror of
https://github.com/QuantumNous/new-api.git
synced 2026-04-19 11:08:37 +00:00
fix max_output_token
This commit is contained in:
@@ -323,6 +323,10 @@ func ChatCompletionsRequestToResponsesRequest(req *dto.GeneralOpenAIRequest) (*d
|
|||||||
if req.MaxCompletionTokens > maxOutputTokens {
|
if req.MaxCompletionTokens > maxOutputTokens {
|
||||||
maxOutputTokens = req.MaxCompletionTokens
|
maxOutputTokens = req.MaxCompletionTokens
|
||||||
}
|
}
|
||||||
|
// OpenAI Responses API rejects max_output_tokens < 16 when explicitly provided.
|
||||||
|
if maxOutputTokens > 0 && maxOutputTokens < 16 {
|
||||||
|
maxOutputTokens = 16
|
||||||
|
}
|
||||||
|
|
||||||
var topP *float64
|
var topP *float64
|
||||||
if req.TopP != 0 {
|
if req.TopP != 0 {
|
||||||
|
|||||||
Reference in New Issue
Block a user