mirror of
https://github.com/QuantumNous/new-api.git
synced 2026-04-18 13:57:26 +00:00
19 lines
423 B
Go
19 lines
423 B
Go
package ali
|
|
|
|
import (
|
|
"github.com/QuantumNous/new-api/dto"
|
|
)
|
|
|
|
// https://help.aliyun.com/document_detail/613695.html?spm=a2c4g.2399480.0.0.1adb778fAdzP9w#341800c0f8w0r
|
|
|
|
const EnableSearchModelSuffix = "-internet"
|
|
|
|
func requestOpenAI2Ali(request dto.GeneralOpenAIRequest) *dto.GeneralOpenAIRequest {
|
|
if request.TopP >= 1 {
|
|
request.TopP = 0.999
|
|
} else if request.TopP <= 0 {
|
|
request.TopP = 0.001
|
|
}
|
|
return &request
|
|
}
|