mirror of
https://github.com/nomic-ai/gpt4all.git
synced 2024-10-01 01:06:10 -04:00
Immediately signal when the model is in a new loading state.
This commit is contained in:
parent
833a56fadd
commit
9dccc96e70
@ -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()) {
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user