This commit is contained in:
kwaroran
2024-04-17 10:33:37 +09:00

View File

@@ -469,9 +469,17 @@ export async function requestChatDataMain(arg:requestDataArgument, model:'model'
if(supportsInlayImage()){
// inlay models doesn't support logit_bias
// gpt-4-turbo supports both logit_bias and inlay image
if(!(
aiModel.startsWith('gpt4_turbo') ||
(aiModel == 'reverse_proxy' && (
db.proxyRequestModel?.startsWith('gpt4_turbo') ||
(db.proxyRequestModel === 'custom' && db.customProxyRequestModel.startsWith('gpt-4-turbo'))
)))){
// @ts-ignore
delete body.logit_bias
}
}
let replacerURL = aiModel === 'openrouter' ? "https://openrouter.ai/api/v1/chat/completions" :
(aiModel === 'reverse_proxy') ? (db.forceReplaceUrl) : ('https://api.openai.com/v1/chat/completions')