mirror of
https://github.com/linux-do/new-api.git
synced 2025-11-05 13:53:42 +08:00
feat: update chatgpt-4o token encoder
This commit is contained in:
@@ -52,7 +52,7 @@ func InitTokenEncoders() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func getModelDefaultTokenEncoder(model string) *tiktoken.Tiktoken {
|
func getModelDefaultTokenEncoder(model string) *tiktoken.Tiktoken {
|
||||||
if strings.HasPrefix(model, "gpt-4o") {
|
if strings.HasPrefix(model, "gpt-4o") || strings.HasPrefix(model, "chatgpt-4o") {
|
||||||
return cl200kTokenEncoder
|
return cl200kTokenEncoder
|
||||||
}
|
}
|
||||||
return defaultTokenEncoder
|
return defaultTokenEncoder
|
||||||
|
|||||||
Reference in New Issue
Block a user