mirror of
https://github.com/nomic-ai/gpt4all.git
synced 2025-06-21 05:04:32 +00:00
Remove unused state in chat.cpp that saves the chat response messages. (#3169)
Signed-off-by: Adam Treat <treat.adam@gmail.com>
This commit is contained in:
parent
20a99d1794
commit
46cb6b0523
@ -186,11 +186,6 @@ void Chat::stopGenerating()
|
|||||||
m_llmodel->stopGenerating();
|
m_llmodel->stopGenerating();
|
||||||
}
|
}
|
||||||
|
|
||||||
QString Chat::response() const
|
|
||||||
{
|
|
||||||
return m_response;
|
|
||||||
}
|
|
||||||
|
|
||||||
Chat::ResponseState Chat::responseState() const
|
Chat::ResponseState Chat::responseState() const
|
||||||
{
|
{
|
||||||
return m_responseState;
|
return m_responseState;
|
||||||
@ -203,10 +198,8 @@ void Chat::handleResponseChanged(const QString &response)
|
|||||||
emit responseStateChanged();
|
emit responseStateChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
m_response = response;
|
|
||||||
const int index = m_chatModel->count() - 1;
|
const int index = m_chatModel->count() - 1;
|
||||||
m_chatModel->updateValue(index, this->response());
|
m_chatModel->updateValue(index, response);
|
||||||
emit responseChanged();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Chat::handleModelLoadingPercentageChanged(float loadingPercentage)
|
void Chat::handleModelLoadingPercentageChanged(float loadingPercentage)
|
||||||
@ -246,7 +239,6 @@ void Chat::responseStopped(qint64 promptResponseMs)
|
|||||||
{
|
{
|
||||||
m_tokenSpeed = QString();
|
m_tokenSpeed = QString();
|
||||||
emit tokenSpeedChanged();
|
emit tokenSpeedChanged();
|
||||||
emit responseChanged();
|
|
||||||
|
|
||||||
m_responseInProgress = false;
|
m_responseInProgress = false;
|
||||||
m_responseState = Chat::ResponseStopped;
|
m_responseState = Chat::ResponseStopped;
|
||||||
|
@ -25,7 +25,6 @@ class Chat : public QObject
|
|||||||
Q_PROPERTY(bool isModelLoaded READ isModelLoaded NOTIFY isModelLoadedChanged)
|
Q_PROPERTY(bool isModelLoaded READ isModelLoaded NOTIFY isModelLoadedChanged)
|
||||||
Q_PROPERTY(bool isCurrentlyLoading READ isCurrentlyLoading NOTIFY isCurrentlyLoadingChanged)
|
Q_PROPERTY(bool isCurrentlyLoading READ isCurrentlyLoading NOTIFY isCurrentlyLoadingChanged)
|
||||||
Q_PROPERTY(float modelLoadingPercentage READ modelLoadingPercentage NOTIFY modelLoadingPercentageChanged)
|
Q_PROPERTY(float modelLoadingPercentage READ modelLoadingPercentage NOTIFY modelLoadingPercentageChanged)
|
||||||
Q_PROPERTY(QString response READ response NOTIFY responseChanged)
|
|
||||||
Q_PROPERTY(ModelInfo modelInfo READ modelInfo WRITE setModelInfo NOTIFY modelInfoChanged)
|
Q_PROPERTY(ModelInfo modelInfo READ modelInfo WRITE setModelInfo NOTIFY modelInfoChanged)
|
||||||
Q_PROPERTY(bool responseInProgress READ responseInProgress NOTIFY responseInProgressChanged)
|
Q_PROPERTY(bool responseInProgress READ responseInProgress NOTIFY responseInProgressChanged)
|
||||||
Q_PROPERTY(bool restoringFromText READ restoringFromText NOTIFY restoringFromTextChanged)
|
Q_PROPERTY(bool restoringFromText READ restoringFromText NOTIFY restoringFromTextChanged)
|
||||||
@ -89,7 +88,6 @@ public:
|
|||||||
|
|
||||||
QList<ResultInfo> databaseResults() const { return m_databaseResults; }
|
QList<ResultInfo> databaseResults() const { return m_databaseResults; }
|
||||||
|
|
||||||
QString response() const;
|
|
||||||
bool responseInProgress() const { return m_responseInProgress; }
|
bool responseInProgress() const { return m_responseInProgress; }
|
||||||
ResponseState responseState() const;
|
ResponseState responseState() const;
|
||||||
ModelInfo modelInfo() const;
|
ModelInfo modelInfo() const;
|
||||||
@ -143,7 +141,6 @@ Q_SIGNALS:
|
|||||||
void isCurrentlyLoadingChanged();
|
void isCurrentlyLoadingChanged();
|
||||||
void modelLoadingPercentageChanged();
|
void modelLoadingPercentageChanged();
|
||||||
void modelLoadingWarning(const QString &warning);
|
void modelLoadingWarning(const QString &warning);
|
||||||
void responseChanged();
|
|
||||||
void responseInProgressChanged();
|
void responseInProgressChanged();
|
||||||
void responseStateChanged();
|
void responseStateChanged();
|
||||||
void promptRequested(const QList<QString> &collectionList, const QString &prompt);
|
void promptRequested(const QList<QString> &collectionList, const QString &prompt);
|
||||||
@ -195,7 +192,6 @@ private:
|
|||||||
QString m_tokenSpeed;
|
QString m_tokenSpeed;
|
||||||
QString m_device;
|
QString m_device;
|
||||||
QString m_fallbackReason;
|
QString m_fallbackReason;
|
||||||
QString m_response;
|
|
||||||
QList<QString> m_collections;
|
QList<QString> m_collections;
|
||||||
QList<QString> m_generatedQuestions;
|
QList<QString> m_generatedQuestions;
|
||||||
ChatModel *m_chatModel;
|
ChatModel *m_chatModel;
|
||||||
|
Loading…
Reference in New Issue
Block a user