mirror of
https://github.com/Palm1r/QodeAssist.git
synced 2025-11-22 02:22:44 -05:00
refactor: Add request id as type
This commit is contained in:
@ -149,7 +149,7 @@ LLMCore::ProviderID LlamaCppProvider::providerID() const
|
||||
}
|
||||
|
||||
void LlamaCppProvider::sendRequest(
|
||||
const QString &requestId, const QUrl &url, const QJsonObject &payload)
|
||||
const LLMCore::RequestID &requestId, const QUrl &url, const QJsonObject &payload)
|
||||
{
|
||||
m_dataBuffers[requestId].clear();
|
||||
m_requestUrls[requestId] = url;
|
||||
@ -166,7 +166,8 @@ void LlamaCppProvider::sendRequest(
|
||||
emit httpClient()->sendRequest(request);
|
||||
}
|
||||
|
||||
void LlamaCppProvider::onDataReceived(const QString &requestId, const QByteArray &data)
|
||||
void LlamaCppProvider::onDataReceived(
|
||||
const QodeAssist::LLMCore::RequestID &requestId, const QByteArray &data)
|
||||
{
|
||||
LLMCore::DataBuffers &buffers = m_dataBuffers[requestId];
|
||||
QStringList lines = buffers.rawStreamBuffer.processData(data);
|
||||
@ -231,7 +232,8 @@ void LlamaCppProvider::onDataReceived(const QString &requestId, const QByteArray
|
||||
}
|
||||
}
|
||||
|
||||
void LlamaCppProvider::onRequestFinished(const QString &requestId, bool success, const QString &error)
|
||||
void LlamaCppProvider::onRequestFinished(
|
||||
const QodeAssist::LLMCore::RequestID &requestId, bool success, const QString &error)
|
||||
{
|
||||
if (!success) {
|
||||
LOG_MESSAGE(QString("LlamaCppProvider request %1 failed: %2").arg(requestId, error));
|
||||
|
||||
Reference in New Issue
Block a user