gpt4all/llm.h

36 lines
647 B
C
Raw Normal View History

2023-04-09 03:28:39 +00:00
#ifndef LLM_H
#define LLM_H
#include <QObject>
#include "chat.h"
2023-04-09 03:28:39 +00:00
class LLM : public QObject
{
Q_OBJECT
Q_PROPERTY(QList<QString> modelList READ modelList NOTIFY modelListChanged)
Q_PROPERTY(Chat *currentChat READ currentChat NOTIFY currentChatChanged)
2023-04-09 03:28:39 +00:00
public:
static LLM *globalInstance();
QList<QString> modelList() const;
2023-04-11 03:34:34 +00:00
Q_INVOKABLE bool checkForUpdates() const;
Chat *currentChat() const { return m_currentChat; }
2023-04-09 03:28:39 +00:00
Q_SIGNALS:
void modelListChanged();
void currentChatChanged();
2023-04-09 03:28:39 +00:00
private:
Chat *m_currentChat;
2023-04-09 03:28:39 +00:00
private:
explicit LLM();
~LLM() {}
friend class MyLLM;
};
#endif // LLM_H