Rework custom API
This commit is contained in:
@@ -41,12 +41,7 @@ export async function encode(data:string):Promise<(number[]|Uint32Array|Int32Arr
|
||||
case 'cohere':
|
||||
return await tokenizeWebTokenizers(data, 'cohere')
|
||||
default:
|
||||
// Add exception for gpt-4o tokenizers on reverse_proxy
|
||||
if(db.proxyRequestModel?.startsWith('gpt4o') ||
|
||||
(db.proxyRequestModel === 'custom' && db.customProxyRequestModel.startsWith('gpt-4o'))) {
|
||||
return await tikJS(data, 'o200k_base')
|
||||
}
|
||||
return await tikJS(data)
|
||||
return await tikJS(data, 'o200k_base')
|
||||
}
|
||||
}
|
||||
if(db.aiModel.startsWith('novellist')){
|
||||
|
||||
Reference in New Issue
Block a user