mirror of
				https://github.com/linux-do/new-api.git
				synced 2025-11-04 21:33:41 +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 {
 | 
			
		||||
	if strings.HasPrefix(model, "gpt-4o") {
 | 
			
		||||
	if strings.HasPrefix(model, "gpt-4o") || strings.HasPrefix(model, "chatgpt-4o") {
 | 
			
		||||
		return cl200kTokenEncoder
 | 
			
		||||
	}
 | 
			
		||||
	return defaultTokenEncoder
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user