mirror of
https://github.com/nomic-ai/gpt4all
synced 2024-11-02 09:40:42 +00:00
Fix up model names that don't begin with 'ggml-'
This commit is contained in:
parent
b39a7d4fd9
commit
782e1e77a4
@ -412,7 +412,8 @@ QList<QString> Chat::modelList() const
|
|||||||
for (const QString& f : fileNames) {
|
for (const QString& f : fileNames) {
|
||||||
QString filePath = exePath + f;
|
QString filePath = exePath + f;
|
||||||
QFileInfo info(filePath);
|
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 (info.exists()) {
|
||||||
if (name == currentModelName)
|
if (name == currentModelName)
|
||||||
list.prepend(name);
|
list.prepend(name);
|
||||||
|
@ -83,7 +83,7 @@ Dialog {
|
|||||||
id: modelName
|
id: modelName
|
||||||
objectName: "modelName"
|
objectName: "modelName"
|
||||||
property string filename: modelData.filename
|
property string filename: modelData.filename
|
||||||
text: !modelData.isChatGPT ? filename.slice(5, filename.length - 4) : filename
|
text: !modelData.isChatGPT ? (filename.startsWith("ggml-") ? filename.slice(5, filename.length - 4) : filename.slice(0, filename.length - 4)) : filename
|
||||||
padding: 20
|
padding: 20
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
|
Loading…
Reference in New Issue
Block a user