From 97de30edd100071ef70372f38e85959cac6378a3 Mon Sep 17 00:00:00 2001 From: Adam Treat Date: Wed, 13 Mar 2024 18:29:55 -0400 Subject: [PATCH] Fix bug with removing old .txt chatgpt files in favor of .rmodel Signed-off-by: Adam Treat --- gpt4all-chat/modellist.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gpt4all-chat/modellist.cpp b/gpt4all-chat/modellist.cpp index 80e7e411..13a9d3cf 100644 --- a/gpt4all-chat/modellist.cpp +++ b/gpt4all-chat/modellist.cpp @@ -1178,7 +1178,7 @@ void ModelList::updateModelsFromDirectory() it.next(); if (!it.fileInfo().isDir()) { QString filename = it.fileName(); - if (filename.endsWith(".txt")) { + if (filename.startsWith("chatgpt-") && filename.endsWith(".txt")) { QString apikey; QString modelname(filename); modelname.chop(4); // strip ".txt" extension @@ -1648,7 +1648,7 @@ void ModelList::parseModelsJsonFile(const QByteArray &jsonData, bool save) "
  • You can apply for an API key with Nomic Atlas.
  • "); const QString modelName = "Nomic Embed"; const QString id = modelName; - const QString modelFilename = "nomic-embed-text-v1.txt"; + const QString modelFilename = "nomic-embed-text-v1.txt"; // FIXME: This should be made to use '.rmodel' as well if (contains(modelFilename)) changeId(modelFilename, id); if (!contains(id))