From 8eb08442779d72417a5fe762bd307fe22f446025 Mon Sep 17 00:00:00 2001 From: Adam Treat Date: Wed, 12 Jul 2023 14:30:11 -0400 Subject: [PATCH] Check if the trimmed version is empty. --- gpt4all-chat/chatllm.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gpt4all-chat/chatllm.cpp b/gpt4all-chat/chatllm.cpp index 0f5da45f..181b8452 100644 --- a/gpt4all-chat/chatllm.cpp +++ b/gpt4all-chat/chatllm.cpp @@ -789,7 +789,7 @@ void ChatLLM::processSystemPrompt() return; const std::string systemPrompt = MySettings::globalInstance()->modelSystemPrompt(m_modelInfo).toStdString(); - if (systemPrompt.empty()) { + if (QString::fromStdString(systemPrompt).trimmed().isEmpty()) { m_processedSystemPrompt = true; return; }