Immediately signal when the model is in a new loading state.

This commit is contained in:
Adam Treat 2023-07-11 15:10:59 -04:00
parent 833a56fadd
commit 9dccc96e70
2 changed files with 2 additions and 16 deletions

View File

@ -249,6 +249,8 @@ void Chat::setModelInfo(const ModelInfo &modelInfo)
if (m_modelInfo == modelInfo)
return;
m_isModelLoaded = false;
emit isModelLoadedChanged();
m_modelLoadingError = QString();
emit modelLoadingErrorChanged();
m_modelInfo = modelInfo;
@ -278,20 +280,6 @@ bool Chat::isRecalc() const
return m_llmodel->isRecalc();
}
void Chat::loadDefaultModel()
{
m_modelLoadingError = QString();
emit modelLoadingErrorChanged();
emit loadDefaultModelRequested();
}
void Chat::loadModel(const ModelInfo &modelInfo)
{
m_modelLoadingError = QString();
emit modelLoadingErrorChanged();
emit loadModelRequested(modelInfo);
}
void Chat::unloadAndDeleteLater()
{
if (!isModelLoaded()) {

View File

@ -69,8 +69,6 @@ public:
void setModelInfo(const ModelInfo &modelInfo);
bool isRecalc() const;
void loadDefaultModel();
void loadModel(const ModelInfo &modelInfo);
void unloadModel();
void reloadModel();
void unloadAndDeleteLater();