Do not attempt to do a blocking retrieval if we don't have any collections.

This commit is contained in:
Adam Treat 2023-12-04 12:58:40 -05:00
parent 9e28dfac9c
commit fb3b1ceba2

View File

@ -534,8 +534,10 @@ bool ChatLLM::promptInternal(const QList<QString> &collectionList, const QString
QList<ResultInfo> databaseResults;
const int retrievalSize = MySettings::globalInstance()->localDocsRetrievalSize();
if (!collectionList.isEmpty()) {
emit requestRetrieveFromDB(collectionList, prompt, retrievalSize, &databaseResults); // blocks
emit databaseResultsChanged(databaseResults);
}
// Augment the prompt template with the results if any
QList<QString> augmentedTemplate;