mirror of
https://github.com/nomic-ai/gpt4all.git
synced 2025-09-05 10:30:29 +00:00
Add the ability to change the directory via text field not just 'browse' button.
This commit is contained in:
@@ -63,6 +63,22 @@ bool LLM::checkForUpdates() const
|
||||
return QProcess::startDetached(fileName);
|
||||
}
|
||||
|
||||
bool LLM::directoryExists(const QString &path) const
|
||||
{
|
||||
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
|
||||
{
|
||||
const QUrl url(path);
|
||||
const QString localFilePath = url.isLocalFile() ? url.toLocalFile() : path;
|
||||
const QFileInfo info(localFilePath);
|
||||
return info.exists() && info.isFile();
|
||||
}
|
||||
|
||||
int32_t LLM::threadCount() const
|
||||
{
|
||||
return m_threadCount;
|
||||
|
Reference in New Issue
Block a user