Make exception on gpt based models from removing logit_bias

This commit is contained in:
IHaBiS02
2024-05-14 05:48:14 +09:00
parent a79a00bd00
commit 73fda3bb93

View File

@@ -497,10 +497,10 @@ export async function requestChatDataMain(arg:requestDataArgument, model:'model'
// inlay models doesn't support logit_bias
// gpt-4-turbo supports both logit_bias and inlay image
if(!(
aiModel.startsWith('gpt4_turbo') ||
aiModel.startsWith('gpt4') ||
(aiModel == 'reverse_proxy' && (
db.proxyRequestModel?.startsWith('gpt4_turbo') ||
(db.proxyRequestModel === 'custom' && db.customProxyRequestModel.startsWith('gpt-4-turbo'))
db.proxyRequestModel?.startsWith('gpt') ||
(db.proxyRequestModel === 'custom' && db.customProxyRequestModel.startsWith('gpt'))
)))){
// @ts-ignore
delete body.logit_bias