mirror of
https://github.com/linux-do/new-api.git
synced 2025-09-17 16:06:38 +08:00
feat: update chatgpt-4o token encoder
This commit is contained in:
parent
5863aa8061
commit
e3b3fdec48
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user