mirror of
https://github.com/nomic-ai/gpt4all.git
synced 2025-09-29 08:46:10 +00:00
Preliminary support for chatgpt models.
This commit is contained in:
@@ -304,12 +304,13 @@ QList<QString> Chat::modelList() const
|
||||
|
||||
if (localPath != exePath) {
|
||||
QDir dir(localPath);
|
||||
dir.setNameFilters(QStringList() << "ggml-*.bin");
|
||||
dir.setNameFilters(QStringList() << "ggml-*.bin" << "chatgpt-*.txt");
|
||||
QStringList fileNames = dir.entryList();
|
||||
for (QString f : fileNames) {
|
||||
QString filePath = localPath + 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() && !list.contains(name)) { // don't allow duplicates
|
||||
if (name == currentModelName)
|
||||
list.prepend(name);
|
||||
|
Reference in New Issue
Block a user