Fix remove model from model download for regular models.

This commit is contained in:
Adam Treat 2023-05-30 16:15:52 -04:00
parent 7f9f91ad94
commit d9f5626481

View File

@ -291,9 +291,8 @@ void Download::removeModel(const QString &modelFile)
{
const bool isChatGPT = modelFile.startsWith("chatgpt-");
const QString filePath = downloadLocalModelsPath()
+ (!isChatGPT ? "ggml-" : QString())
+ modelFile
+ (!isChatGPT ? ".bin" : ".txt");
+ (isChatGPT ? ".txt" : QString());
QFile file(filePath);
if (!file.exists()) {
qWarning() << "ERROR: Cannot remove file that does not exist" << filePath;