From fc169e739af29982f4aa99bafb891bb2820cc511 Mon Sep 17 00:00:00 2001 From: Adam Treat Date: Fri, 8 Mar 2024 10:42:49 -0500 Subject: [PATCH] Add trailing commas for things that need to be added in the future. Signed-off-by: Adam Treat --- gpt4all-chat/download.cpp | 8 ++++---- gpt4all-chat/modellist.cpp | 14 +++++++------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/gpt4all-chat/download.cpp b/gpt4all-chat/download.cpp index 442bdebb..bd870119 100644 --- a/gpt4all-chat/download.cpp +++ b/gpt4all-chat/download.cpp @@ -217,7 +217,7 @@ void Download::removeModel(const QString &modelFile) { ModelList::BytesTotalRole, 0 }, { ModelList::TimestampRole, 0 }, { ModelList::SpeedRole, QString() }, - { ModelList::DownloadErrorRole, QString() } + { ModelList::DownloadErrorRole, QString() }, }; ModelList::globalInstance()->updateDataByFilename(modelFile, data); } @@ -364,7 +364,7 @@ void Download::handleDownloadProgress(qint64 bytesReceived, qint64 bytesTotal) { ModelList::BytesReceivedRole, currentBytesReceived }, { ModelList::BytesTotalRole, bytesTotal }, { ModelList::SpeedRole, speedText }, - { ModelList::TimestampRole, currentUpdate } + { ModelList::TimestampRole, currentUpdate }, }; ModelList::globalInstance()->updateDataByFilename(modelFilename, data); } @@ -470,7 +470,7 @@ void Download::handleModelDownloadFinished() if (!hasRetry(modelFilename)) { QVector> data { { ModelList::DownloadingRole, false }, - { ModelList::DownloadErrorRole, errorString } + { ModelList::DownloadErrorRole, errorString }, }; ModelList::globalInstance()->updateDataByFilename(modelFilename, data); } @@ -509,7 +509,7 @@ void Download::handleHashAndSaveFinished(bool success, const QString &error, QVector> data { { ModelList::CalcHashRole, false }, - { ModelList::DownloadingRole, false } + { ModelList::DownloadingRole, false }, }; modelReply->deleteLater(); diff --git a/gpt4all-chat/modellist.cpp b/gpt4all-chat/modellist.cpp index 35334c92..36ee823d 100644 --- a/gpt4all-chat/modellist.cpp +++ b/gpt4all-chat/modellist.cpp @@ -998,7 +998,7 @@ QString ModelList::clone(const ModelInfo &model) { ModelList::RepeatPenaltyRole, model.repeatPenalty() }, { ModelList::RepeatPenaltyTokensRole, model.repeatPenaltyTokens() }, { ModelList::PromptTemplateRole, model.promptTemplate() }, - { ModelList::SystemPromptRole, model.systemPrompt() } + { ModelList::SystemPromptRole, model.systemPrompt() }, }; updateData(id, data); return id; @@ -1150,7 +1150,7 @@ void ModelList::updateModelsFromDirectory() // FIXME: WE should change this to use a consistent filename for online models { OnlineRole, filename.startsWith("chatgpt-") || filename.startsWith("nomic-") }, { DirpathRole, info.dir().absolutePath() + "/" }, - { FilesizeRole, toFileSize(info.size()) } + { FilesizeRole, toFileSize(info.size()) }, }; updateData(id, data); } @@ -1420,7 +1420,7 @@ void ModelList::parseModelsJsonFile(const QByteArray &jsonData, bool save) { ModelList::RamrequiredRole, 0 }, { ModelList::ParametersRole, "?" }, { ModelList::QuantRole, "NA" }, - { ModelList::TypeRole, "GPT" } + { ModelList::TypeRole, "GPT" }, }; updateData(id, data); } @@ -1447,7 +1447,7 @@ void ModelList::parseModelsJsonFile(const QByteArray &jsonData, bool save) { ModelList::RamrequiredRole, 0 }, { ModelList::ParametersRole, "?" }, { ModelList::QuantRole, "NA" }, - { ModelList::TypeRole, "GPT" } + { ModelList::TypeRole, "GPT" }, }; updateData(id, data); } @@ -1478,7 +1478,7 @@ void ModelList::parseModelsJsonFile(const QByteArray &jsonData, bool save) { ModelList::RamrequiredRole, 0 }, { ModelList::ParametersRole, "?" }, { ModelList::QuantRole, "NA" }, - { ModelList::TypeRole, "Bert" } + { ModelList::TypeRole, "Bert" }, }; updateData(id, data); } @@ -1497,7 +1497,7 @@ void ModelList::updateDiscoveredInstalled(const ModelInfo &info) { ModelList::DownloadsRole, info.downloads() }, { ModelList::RecencyRole, info.recency() }, { ModelList::QuantRole, info.quant() }, - { ModelList::TypeRole, info.type() } + { ModelList::TypeRole, info.type() }, }; updateData(info.id(), data); } @@ -1910,7 +1910,7 @@ void ModelList::handleDiscoveryItemFinished() { ModelList::QuantRole, toQuantString(modelFilename) }, { ModelList::TypeRole, type }, { ModelList::HashRole, linkedEtagHeader }, - { ModelList::HashAlgorithmRole, ModelInfo::Sha256 } + { ModelList::HashAlgorithmRole, ModelInfo::Sha256 }, }; updateData(id, data);