-
Notifications
You must be signed in to change notification settings - Fork 7.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This fixes the issues with installed versions of v2.6.0.
- Loading branch information
1 parent
f7aeeca
commit 7e9786f
Showing
5 changed files
with
27 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,14 @@ | ||
#include "llm.h" | ||
#include "../gpt4all-backend/sysinfo.h" | ||
#include "../gpt4all-backend/llmodel.h" | ||
#include "network.h" | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
draeath
|
||
|
||
#include <QCoreApplication> | ||
#include <QDesktopServices> | ||
#include <QDir> | ||
#include <QFile> | ||
#include <QProcess> | ||
#include <QResource> | ||
#include <QSettings> | ||
#include <QDesktopServices> | ||
#include <QUrl> | ||
#include <fstream> | ||
|
||
class MyLLM: public LLM { }; | ||
|
@@ -23,20 +22,6 @@ LLM::LLM() | |
: QObject{nullptr} | ||
, m_compatHardware(true) | ||
{ | ||
QString llmodelSearchPaths = QCoreApplication::applicationDirPath(); | ||
const QString libDir = QCoreApplication::applicationDirPath() + "/../lib/"; | ||
if (directoryExists(libDir)) | ||
llmodelSearchPaths += ";" + libDir; | ||
#if defined(Q_OS_MAC) | ||
const QString binDir = QCoreApplication::applicationDirPath() + "/../../../"; | ||
if (directoryExists(binDir)) | ||
llmodelSearchPaths += ";" + binDir; | ||
const QString frameworksDir = QCoreApplication::applicationDirPath() + "/../Frameworks/"; | ||
if (directoryExists(frameworksDir)) | ||
llmodelSearchPaths += ";" + frameworksDir; | ||
#endif | ||
LLModel::Implementation::setImplementationsSearchPath(llmodelSearchPaths.toStdString()); | ||
|
||
#if defined(__x86_64__) | ||
#ifndef _MSC_VER | ||
const bool minimal(__builtin_cpu_supports("avx")); | ||
|
@@ -86,15 +71,15 @@ bool LLM::checkForUpdates() const | |
#endif | ||
} | ||
|
||
bool LLM::directoryExists(const QString &path) const | ||
bool LLM::directoryExists(const QString &path) | ||
{ | ||
const QUrl url(path); | ||
const QString localFilePath = url.isLocalFile() ? url.toLocalFile() : path; | ||
const QFileInfo info(localFilePath); | ||
return info.exists() && info.isDir(); | ||
} | ||
|
||
bool LLM::fileExists(const QString &path) const | ||
bool LLM::fileExists(const QString &path) | ||
{ | ||
const QUrl url(path); | ||
const QString localFilePath = url.isLocalFile() ? url.toLocalFile() : path; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Dropping this include breaks the build.