Add the ability to change the directory via text field not just 'browse' button.

This commit is contained in:
Adam Treat
2023-06-02 22:52:55 -04:00
parent 25ee51e2ca
commit 55055ca983
7 changed files with 67 additions and 29 deletions

View File

@@ -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;