Couple of bugfixes.

This commit is contained in:
Adam Treat 2023-05-09 19:15:18 -04:00
parent 2206fa7f8c
commit 42926a484f
3 changed files with 5 additions and 2 deletions

View File

@ -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();

View File

@ -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)

View File

@ -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");