diff --git a/gpt4all-chat/chatllm.cpp b/gpt4all-chat/chatllm.cpp index 6e49d712..e5a84548 100644 --- a/gpt4all-chat/chatllm.cpp +++ b/gpt4all-chat/chatllm.cpp @@ -534,8 +534,10 @@ bool ChatLLM::promptInternal(const QList &collectionList, const QString QList databaseResults; const int retrievalSize = MySettings::globalInstance()->localDocsRetrievalSize(); - emit requestRetrieveFromDB(collectionList, prompt, retrievalSize, &databaseResults); // blocks - emit databaseResultsChanged(databaseResults); + if (!collectionList.isEmpty()) { + emit requestRetrieveFromDB(collectionList, prompt, retrievalSize, &databaseResults); // blocks + emit databaseResultsChanged(databaseResults); + } // Augment the prompt template with the results if any QList augmentedTemplate;