mirror of
https://github.com/nomic-ai/gpt4all.git
synced 2025-09-06 19:10:15 +00:00
Fix up model names that don't begin with 'ggml-'
This commit is contained in:
@@ -412,7 +412,8 @@ QList<QString> Chat::modelList() const
|
||||
for (const QString& f : fileNames) {
|
||||
QString filePath = exePath + f;
|
||||
QFileInfo info(filePath);
|
||||
QString name = info.completeBaseName().remove(0, 5);
|
||||
QString basename = info.completeBaseName();
|
||||
QString name = basename.startsWith("ggml-") ? basename.remove(0, 5) : basename;
|
||||
if (info.exists()) {
|
||||
if (name == currentModelName)
|
||||
list.prepend(name);
|
||||
|
Reference in New Issue
Block a user