mirror of https://github.com/nomic-ai/gpt4all
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
45 lines
1.0 KiB
C
45 lines
1.0 KiB
C
1 year ago
|
#ifndef LLM_H
|
||
|
#define LLM_H
|
||
|
|
||
|
#include <QObject>
|
||
1 year ago
|
|
||
1 year ago
|
#include "chatlistmodel.h"
|
||
1 year ago
|
|
||
|
class LLM : public QObject
|
||
|
{
|
||
|
Q_OBJECT
|
||
1 year ago
|
Q_PROPERTY(ChatListModel *chatListModel READ chatListModel NOTIFY chatListModelChanged)
|
||
1 year ago
|
Q_PROPERTY(int32_t threadCount READ threadCount WRITE setThreadCount NOTIFY threadCountChanged)
|
||
1 year ago
|
Q_PROPERTY(bool compatHardware READ compatHardware NOTIFY compatHardwareChanged)
|
||
1 year ago
|
|
||
1 year ago
|
public:
|
||
|
static LLM *globalInstance();
|
||
|
|
||
1 year ago
|
ChatListModel *chatListModel() const { return m_chatListModel; }
|
||
1 year ago
|
int32_t threadCount() const;
|
||
|
void setThreadCount(int32_t n_threads);
|
||
1 year ago
|
bool compatHardware() const { return m_compatHardware; }
|
||
1 year ago
|
|
||
|
Q_INVOKABLE bool checkForUpdates() const;
|
||
1 year ago
|
|
||
1 year ago
|
Q_SIGNALS:
|
||
1 year ago
|
void chatListModelChanged();
|
||
1 year ago
|
void threadCountChanged();
|
||
1 year ago
|
void compatHardwareChanged();
|
||
1 year ago
|
|
||
1 year ago
|
private Q_SLOTS:
|
||
1 year ago
|
void aboutToQuit();
|
||
1 year ago
|
|
||
|
private:
|
||
1 year ago
|
ChatListModel *m_chatListModel;
|
||
1 year ago
|
int32_t m_threadCount;
|
||
1 year ago
|
bool m_compatHardware;
|
||
1 year ago
|
|
||
|
private:
|
||
|
explicit LLM();
|
||
|
~LLM() {}
|
||
|
friend class MyLLM;
|
||
|
};
|
||
|
|
||
|
#endif // LLM_H
|