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

Method checkModelValid

src/plugins/aimanager/aimanager.cpp:75–85  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

73}
74
75bool AiManager::checkModelValid(const LLMInfo &info, QString *errStr)
76{
77 if (info.type == LLMType::OPENAI) {
78 OpenAiCompatibleLLM llm;
79 llm.setModelName(info.modelName);
80 llm.setModelPath(info.modelPath);
81 llm.setApiKey(info.apikey);
82 bool valid = llm.checkValid(errStr);
83 return valid;
84 }
85}
86
87void AiManager::appendModel(const LLMInfo &info)
88{

Callers 1

slotAddModelMethod · 0.45

Calls 4

setModelNameMethod · 0.45
setModelPathMethod · 0.45
setApiKeyMethod · 0.45
checkValidMethod · 0.45

Tested by

no test coverage detected