mirror of
https://github.com/songquanpeng/one-api.git
synced 2025-09-17 17:16:38 +08:00
fix: update comments for o1 model handling
This commit is contained in:
parent
d70d5656ab
commit
73a928f970
@ -85,8 +85,8 @@ func (a *Adaptor) ConvertRequest(c *gin.Context, relayMode int, request *model.G
|
||||
request.StreamOptions.IncludeUsage = true
|
||||
}
|
||||
|
||||
// o1 do not support system prompt and max_tokens
|
||||
if strings.HasPrefix(request.Model, "o1-mini") || strings.HasPrefix(request.Model, "o1-preview") {
|
||||
// o1/o1-mini/o1-preview do not support system prompt and max_tokens
|
||||
if strings.HasPrefix(request.Model, "o1") {
|
||||
request.MaxTokens = 0
|
||||
request.Messages = func(raw []model.Message) (filtered []model.Message) {
|
||||
for i := range raw {
|
||||
|
@ -467,7 +467,7 @@ func GetCompletionRatio(name string, channelType int) float64 {
|
||||
}
|
||||
return 2
|
||||
}
|
||||
// including o1, o1-preview, o1-mini
|
||||
// including o1/o1-preview/o1-mini
|
||||
if strings.HasPrefix(name, "o1") {
|
||||
return 4
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user