From 09b5f87b8dde4f563d5b9d890bb3e298d26417af Mon Sep 17 00:00:00 2001 From: Adam Treat Date: Tue, 9 May 2023 19:15:18 -0400 Subject: [PATCH] Couple of bugfixes. --- download.cpp | 3 ++- download.h | 1 + qml/ModelDownloaderDialog.qml | 3 ++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/download.cpp b/download.cpp index 72398058..736c8fa1 100644 --- a/download.cpp +++ b/download.cpp @@ -366,6 +366,7 @@ void Download::parseModelsJsonFile(const QByteArray &jsonData) modelInfo.isDefault = isDefault; modelInfo.bestGPTJ = bestGPTJ; modelInfo.bestLlama = bestLlama; + modelInfo.bestMPT = bestMPT; modelInfo.description = description; modelInfo.requires = requires; m_modelMap.insert(modelInfo.filename, modelInfo); @@ -431,7 +432,7 @@ void Download::handleErrorOccurred(QNetworkReply::NetworkError code) return; QString modelFilename = modelReply->url().fileName(); - qWarning() << "ERROR: Network error occurred attemptint to download" + qWarning() << "ERROR: Network error occurred attempting to download" << modelFilename << "code:" << code << "errorString" << modelReply->errorString(); diff --git a/download.h b/download.h index 5bcef9d9..638bae43 100644 --- a/download.h +++ b/download.h @@ -19,6 +19,7 @@ struct ModelInfo { Q_PROPERTY(bool isDefault MEMBER isDefault) Q_PROPERTY(bool bestGPTJ MEMBER bestGPTJ) Q_PROPERTY(bool bestLlama MEMBER bestLlama) + Q_PROPERTY(bool bestMPT MEMBER bestMPT) Q_PROPERTY(QString description MEMBER description) Q_PROPERTY(QString requires MEMBER requires) diff --git a/qml/ModelDownloaderDialog.qml b/qml/ModelDownloaderDialog.qml index cca4e494..0c2a58a5 100644 --- a/qml/ModelDownloaderDialog.qml +++ b/qml/ModelDownloaderDialog.qml @@ -86,7 +86,7 @@ Dialog { padding: 20 anchors.top: parent.top anchors.left: parent.left - font.bold: modelData.isDefault || modelData.bestGPTJ || modelData.bestLlama + font.bold: modelData.isDefault || modelData.bestGPTJ || modelData.bestLlama || modelData.bestMPT color: theme.assistantColor Accessible.role: Accessible.Paragraph Accessible.name: qsTr("Model file") @@ -277,6 +277,7 @@ Dialog { let timeDifference = currentTime - lastUpdate[modelName].timestamp; let bytesDifference = bytesReceived - lastUpdate[modelName].bytesReceived; let speed = (bytesDifference / timeDifference) * 1000; // bytes per second + delegateItem.downloading = true // Update the speed label let speedLabel = delegateItem.children.find(child => child.objectName === "speedLabel");