From 570abb15241b738366efc26e4a3f3ee45f8095a8 Mon Sep 17 00:00:00 2001 From: kwaroran Date: Tue, 5 Mar 2024 02:46:08 +0900 Subject: [PATCH] Fix chat content trimming in sendChat function --- src/ts/process/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ts/process/index.ts b/src/ts/process/index.ts index da82f0a6..f63977bd 100644 --- a/src/ts/process/index.ts +++ b/src/ts/process/index.ts @@ -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')){