2023-04-08 23:28:39 -04:00
|
|
|
#ifndef LLM_H
|
|
|
|
#define LLM_H
|
|
|
|
|
|
|
|
#include <QObject>
|
2024-06-04 14:47:11 -04:00
|
|
|
#include <QString>
|
|
|
|
#include <QtGlobal>
|
2023-04-30 20:28:07 -04:00
|
|
|
|
2023-04-08 23:28:39 -04:00
|
|
|
class LLM : public QObject
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
2024-02-07 09:53:14 -05:00
|
|
|
Q_PROPERTY(bool isNetworkOnline READ isNetworkOnline NOTIFY isNetworkOnlineChanged)
|
|
|
|
|
2023-04-08 23:28:39 -04:00
|
|
|
public:
|
|
|
|
static LLM *globalInstance();
|
|
|
|
|
2023-07-12 08:50:21 -04:00
|
|
|
Q_INVOKABLE bool hasSettingsAccess() const;
|
|
|
|
Q_INVOKABLE bool compatHardware() const { return m_compatHardware; }
|
2023-05-01 14:24:16 -04:00
|
|
|
|
|
|
|
Q_INVOKABLE bool checkForUpdates() const;
|
2024-01-11 12:02:39 -05:00
|
|
|
Q_INVOKABLE static bool directoryExists(const QString &path);
|
|
|
|
Q_INVOKABLE static bool fileExists(const QString &path);
|
2023-06-22 15:44:49 -04:00
|
|
|
Q_INVOKABLE qint64 systemTotalRAMInGB() const;
|
|
|
|
Q_INVOKABLE QString systemTotalRAMInGBString() const;
|
2024-02-07 09:53:14 -05:00
|
|
|
Q_INVOKABLE bool isNetworkOnline() const;
|
2023-04-30 20:28:07 -04:00
|
|
|
|
2023-04-08 23:28:39 -04:00
|
|
|
Q_SIGNALS:
|
2024-02-07 09:53:14 -05:00
|
|
|
void isNetworkOnlineChanged();
|
2023-04-08 23:28:39 -04:00
|
|
|
|
2023-05-01 14:24:16 -04:00
|
|
|
private:
|
2023-05-08 08:23:00 -04:00
|
|
|
bool m_compatHardware;
|
2023-04-08 23:28:39 -04:00
|
|
|
|
|
|
|
private:
|
|
|
|
explicit LLM();
|
|
|
|
~LLM() {}
|
|
|
|
friend class MyLLM;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // LLM_H
|