MCPcopy Create free account
hub / github.com/Codeya-IDE/deepin-ide / findModel

Method findModel

src/plugins/smartut/manager/smartutmanager.cpp:109–122  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

107}
108
109AbstractLLM *SmartUTManager::findModel(const QString &model)
110{
111 const auto &models = d->aiSrv->getAllModel();
112 auto iter = std::find_if(models.cbegin(), models.cend(),
113 [model](const LLMInfo &info) {
114 return info.modelName == model;
115 });
116 if (iter == models.cend()) {
117 d->errorMsg = tr("A model named \"%1\" was not found").arg(model);
118 return nullptr;
119 }
120
121 return d->aiSrv->getLLM(*iter);
122}
123
124QString SmartUTManager::userPrompt(const QString &framework) const
125{

Callers 2

checkModelValidMethod · 0.80
createModelsMethod · 0.80

Calls 4

getAllModelMethod · 0.80
cbeginMethod · 0.80
cendMethod · 0.80
getLLMMethod · 0.80

Tested by

no test coverage detected