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

Method request

src/plugins/aimanager/codegeex/codegeexllm.cpp:443–455  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

441}
442
443void CodeGeeXLLM::request(const QJsonObject &data)
444{
445 QByteArray body = QJsonDocument(data).toJson();
446 setModelState(Busy);
447
448 QNetworkReply *reply = d->postMessage(modelPath(), d->apiKey, body);
449 connect(this, &CodeGeeXLLM::requstCancel, reply, &QNetworkReply::abort);
450 connect(reply, &QNetworkReply::finished, this, [=](){
451 d->handleReplyFinished(reply);
452 });
453
454 d->processResponse(reply);
455}
456
457void CodeGeeXLLM::request(const QString &prompt, ResponseHandler handler)
458{

Callers 6

onGenerateMethod · 0.45
addCommentMethod · 0.45
requestSyncMethod · 0.45
slotSendSyncRequestMethod · 0.45
addGenerateTaskMethod · 0.45

Calls 10

connectFunction · 0.85
createNewSessionMethod · 0.80
insertMethod · 0.80
QJsonDocumentClass · 0.50
QStringClass · 0.50
toJsonMethod · 0.45
postMessageMethod · 0.45
handleReplyFinishedMethod · 0.45
processResponseMethod · 0.45
isEmptyMethod · 0.45

Tested by

no test coverage detected