Fix "OpenAI-compatible" endpoints choking on empty logit bias

This commit is contained in:
Cohee 2024-11-05 16:42:51 +00:00
parent 2daff0e736
commit abef12d403

View File

@ -1813,6 +1813,10 @@ async function sendOpenAIRequest(type, messages, signal) {
biasCache = logit_bias;
}
if (Object.keys(logit_bias).length === 0) {
logit_bias = undefined;
}
if (isScale && oai_settings.use_alt_scale) {
return sendAltScaleRequest(messages, logit_bias, signal, type);
}