@@ -25,6 +25,7 @@ class Chat : public QObject
2525 Q_PROPERTY (QList<QString> collectionList READ collectionList NOTIFY collectionListChanged)
2626 Q_PROPERTY (QString modelLoadingError READ modelLoadingError NOTIFY modelLoadingErrorChanged)
2727 Q_PROPERTY (QString tokenSpeed READ tokenSpeed NOTIFY tokenSpeedChanged);
28+ Q_PROPERTY (QString device READ device NOTIFY deviceChanged);
2829 QML_ELEMENT
2930 QML_UNCREATABLE (" Only creatable from c++!" )
3031
@@ -88,6 +89,7 @@ class Chat : public QObject
8889 QString modelLoadingError () const { return m_modelLoadingError; }
8990
9091 QString tokenSpeed () const { return m_tokenSpeed; }
92+ QString device () const { return m_device; }
9193
9294public Q_SLOTS:
9395 void serverNewPromptResponsePair (const QString &prompt);
@@ -115,6 +117,7 @@ public Q_SLOTS:
115117 void isServerChanged ();
116118 void collectionListChanged (const QList<QString> &collectionList);
117119 void tokenSpeedChanged ();
120+ void deviceChanged ();
118121
119122private Q_SLOTS:
120123 void handleResponseChanged (const QString &response);
@@ -125,6 +128,7 @@ private Q_SLOTS:
125128 void handleRecalculating ();
126129 void handleModelLoadingError (const QString &error);
127130 void handleTokenSpeedChanged (const QString &tokenSpeed);
131+ void handleDeviceChanged (const QString &device);
128132 void handleDatabaseResultsChanged (const QList<ResultInfo> &results);
129133 void handleModelInfoChanged (const ModelInfo &modelInfo);
130134 void handleModelInstalled ();
@@ -137,6 +141,7 @@ private Q_SLOTS:
137141 ModelInfo m_modelInfo;
138142 QString m_modelLoadingError;
139143 QString m_tokenSpeed;
144+ QString m_device;
140145 QString m_response;
141146 QList<QString> m_collections;
142147 ChatModel *m_chatModel;
0 commit comments