mirror of
https://github.com/nomic-ai/gpt4all.git
synced 2024-09-20 07:45:54 +00:00
Do not attempt to do a blocking retrieval if we don't have any collections.
This commit is contained in:
parent
9e28dfac9c
commit
fb3b1ceba2
@ -534,8 +534,10 @@ bool ChatLLM::promptInternal(const QList<QString> &collectionList, const QString
|
|||||||
|
|
||||||
QList<ResultInfo> databaseResults;
|
QList<ResultInfo> databaseResults;
|
||||||
const int retrievalSize = MySettings::globalInstance()->localDocsRetrievalSize();
|
const int retrievalSize = MySettings::globalInstance()->localDocsRetrievalSize();
|
||||||
emit requestRetrieveFromDB(collectionList, prompt, retrievalSize, &databaseResults); // blocks
|
if (!collectionList.isEmpty()) {
|
||||||
emit databaseResultsChanged(databaseResults);
|
emit requestRetrieveFromDB(collectionList, prompt, retrievalSize, &databaseResults); // blocks
|
||||||
|
emit databaseResultsChanged(databaseResults);
|
||||||
|
}
|
||||||
|
|
||||||
// Augment the prompt template with the results if any
|
// Augment the prompt template with the results if any
|
||||||
QList<QString> augmentedTemplate;
|
QList<QString> augmentedTemplate;
|
||||||
|
Loading…
Reference in New Issue
Block a user