diff --git a/gpt4all-chat/sysinfo.h b/gpt4all-backend/sysinfo.h similarity index 100% rename from gpt4all-chat/sysinfo.h rename to gpt4all-backend/sysinfo.h diff --git a/gpt4all-chat/CMakeLists.txt b/gpt4all-chat/CMakeLists.txt index b355a6e4..73907253 100644 --- a/gpt4all-chat/CMakeLists.txt +++ b/gpt4all-chat/CMakeLists.txt @@ -78,7 +78,6 @@ qt_add_executable(chat server.h server.cpp logger.h logger.cpp responsetext.h responsetext.cpp - sysinfo.h ${METAL_SHADER_FILE} ) diff --git a/gpt4all-chat/llm.cpp b/gpt4all-chat/llm.cpp index b91cb96c..cd33fdc1 100644 --- a/gpt4all-chat/llm.cpp +++ b/gpt4all-chat/llm.cpp @@ -1,8 +1,8 @@ #include "llm.h" #include "config.h" -#include "sysinfo.h" #include "chatlistmodel.h" #include "../gpt4all-backend/llmodel.h" +#include "../gpt4all-backend/sysinfo.h" #include "network.h" #include diff --git a/gpt4all-chat/modellist.cpp b/gpt4all-chat/modellist.cpp index 4c4b7e78..1ed55f61 100644 --- a/gpt4all-chat/modellist.cpp +++ b/gpt4all-chat/modellist.cpp @@ -148,7 +148,7 @@ ModelInfo ModelList::defaultModelInfo() const if (!info->installed) continue; defaultModel = info; - if (!hasDefaultName && defaultModel->isDefault) break; + if (!hasDefaultName) break; if (hasDefaultName && (defaultModel->name == defaultModelName || defaultModel->filename == defaultModelName)) break; } if (defaultModel) diff --git a/gpt4all-chat/network.cpp b/gpt4all-chat/network.cpp index 9cfbe90b..61ded534 100644 --- a/gpt4all-chat/network.cpp +++ b/gpt4all-chat/network.cpp @@ -1,6 +1,6 @@ #include "network.h" +#include "llm.h" #include "chatlistmodel.h" -#include "sysinfo.h" #include #include @@ -411,7 +411,7 @@ void Network::sendMixpanelEvent(const QString &ev, const QVector &valu if (ev == "startup") { const QSize display = QGuiApplication::primaryScreen()->size(); properties.insert("display", QString("%1x%2").arg(display.width()).arg(display.height())); - properties.insert("ram", getSystemTotalRAMInGB()); + properties.insert("ram", LLM::globalInstance()->systemTotalRAMInGB()); #if defined(Q_OS_MAC) properties.insert("cpu", QString::fromStdString(getCPUModel())); #endif