gpt4all/gpt4all-chat/llm.h

39 lines
884 B
C
Raw Normal View History

2023-04-09 03:28:39 +00:00
#ifndef LLM_H
#define LLM_H
#include <QObject>
#include <QString>
#include <QtGlobal>
2023-04-09 03:28:39 +00:00
class LLM : public QObject
{
Q_OBJECT
Q_PROPERTY(bool isNetworkOnline READ isNetworkOnline NOTIFY isNetworkOnlineChanged)
2023-04-09 03:28:39 +00:00
public:
static LLM *globalInstance();
Q_INVOKABLE bool hasSettingsAccess() const;
Q_INVOKABLE bool compatHardware() const { return m_compatHardware; }
Q_INVOKABLE bool checkForUpdates() const;
Q_INVOKABLE static bool directoryExists(const QString &path);
Q_INVOKABLE static bool fileExists(const QString &path);
2023-06-22 19:44:49 +00:00
Q_INVOKABLE qint64 systemTotalRAMInGB() const;
Q_INVOKABLE QString systemTotalRAMInGBString() const;
Q_INVOKABLE bool isNetworkOnline() const;
2023-04-09 03:28:39 +00:00
Q_SIGNALS:
void isNetworkOnlineChanged();
2023-04-09 03:28:39 +00:00
private:
bool m_compatHardware;
2023-04-09 03:28:39 +00:00
private:
explicit LLM();
~LLM() {}
friend class MyLLM;
};
#endif // LLM_H