Fix chat content trimming in sendChat function

This commit is contained in:
kwaroran
2024-03-05 02:46:08 +09:00
parent 65ea30bde1
commit 570abb1524

View File

@@ -708,7 +708,7 @@ export async function sendChat(chatProcessIndex = -1,arg:{chatAdditonalTokens?:n
function pushPrompts(cha:OpenAIChat[]){
for(const chat of cha){
if(!chat.content){
if(!chat.content.trim()){
continue
}
if(!(db.aiModel.startsWith('gpt') || db.aiModel.startsWith('claude') || db.aiModel === 'openrouter' || db.aiModel === 'reverse_proxy')){