models: add DeepSeek-R1 distillations to official models list (#3437)

Signed-off-by: Jared Van Bortel <jared@nomic.ai>
This commit is contained in:
Jared Van Bortel
2025-01-30 16:23:41 -05:00
committed by GitHub
parent 007a7af1c8
commit 34037f3101
3 changed files with 73 additions and 3 deletions

View File

@@ -1621,7 +1621,6 @@ void ModelList::parseModelsJsonFile(const QByteArray &jsonData, bool save)
QString requiresVersion = obj["requires"].toString();
QString versionRemoved = obj["removedIn"].toString();
QString url = obj["url"].toString();
QByteArray modelHash = obj["md5sum"].toString().toLatin1();
bool isDefault = obj.contains("isDefault") && obj["isDefault"] == u"true"_s;
bool disableGUI = obj.contains("disableGUI") && obj["disableGUI"] == u"true"_s;
QString description = obj["description"].toString();
@@ -1632,6 +1631,16 @@ void ModelList::parseModelsJsonFile(const QByteArray &jsonData, bool save)
QString type = obj["type"].toString();
bool isEmbeddingModel = obj["embeddingModel"].toBool();
QByteArray modelHash;
ModelInfo::HashAlgorithm hashAlgorithm;
if (auto it = obj.find("sha256sum"_L1); it != obj.end()) {
modelHash = it->toString().toLatin1();
hashAlgorithm = ModelInfo::Sha256;
} else {
modelHash = obj["md5sum"].toString().toLatin1();
hashAlgorithm = ModelInfo::Md5;
}
// Some models aren't supported in the GUI at all
if (disableGUI)
continue;
@@ -1660,7 +1669,7 @@ void ModelList::parseModelsJsonFile(const QByteArray &jsonData, bool save)
{ ModelList::FilenameRole, modelFilename },
{ ModelList::FilesizeRole, modelFilesize },
{ ModelList::HashRole, modelHash },
{ ModelList::HashAlgorithmRole, ModelInfo::Md5 },
{ ModelList::HashAlgorithmRole, hashAlgorithm },
{ ModelList::DefaultRole, isDefault },
{ ModelList::DescriptionRole, description },
{ ModelList::RequiresVersionRole, requiresVersion },