mirror of
https://github.com/nomic-ai/gpt4all
synced 2024-11-02 09:40:42 +00:00
Fix bug with install of online models.
This commit is contained in:
parent
26acdebafa
commit
27912f6e1a
@ -185,7 +185,10 @@ void Download::installModel(const QString &modelFile, const QString &apiKey)
|
||||
QTextStream stream(&file);
|
||||
stream << apiKey;
|
||||
file.close();
|
||||
ModelList::globalInstance()->updateModelsFromDirectory();
|
||||
}
|
||||
|
||||
ModelList::globalInstance()->updateDataByFilename(modelFile, ModelList::InstalledRole, true);
|
||||
}
|
||||
|
||||
void Download::removeModel(const QString &modelFile)
|
||||
@ -202,6 +205,7 @@ void Download::removeModel(const QString &modelFile)
|
||||
file.remove();
|
||||
}
|
||||
|
||||
ModelList::globalInstance()->updateDataByFilename(modelFile, ModelList::InstalledRole, false);
|
||||
ModelList::globalInstance()->updateDataByFilename(modelFile, ModelList::BytesReceivedRole, 0);
|
||||
ModelList::globalInstance()->updateDataByFilename(modelFile, ModelList::BytesTotalRole, 0);
|
||||
ModelList::globalInstance()->updateDataByFilename(modelFile, ModelList::TimestampRole, 0);
|
||||
|
Loading…
Reference in New Issue
Block a user