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

Method requestSync

src/plugins/chat/chatmanager.cpp:289–301  ·  view source on GitHub ↗

For quick processing of special requests

Source from the content-addressed store, hash-verified

287
288//For quick processing of special requests
289QString ChatManager::requestSync(const QString &prompt)
290{
291 QEventLoop loop;
292 QString response;
293 connect(liteLLM, &AbstractLLM::dataReceived, &loop, [=, &loop, &response](const QString &data, AbstractLLM::ResponseState state) {
294 response = data;
295 loop.exit();
296 });
297 // use liteLLM to handle request. quickly get the response
298 liteLLM->request(prompt);
299 loop.exec();
300 return response;
301}
302
303void ChatManager::slotSendSyncRequest(const QJsonObject &obj)
304{

Callers

nothing calls this directly

Calls 4

connectFunction · 0.85
exitMethod · 0.45
requestMethod · 0.45
execMethod · 0.45

Tested by

no test coverage detected